mavlink/home/runner/work/rust-mavlink/rust-mavlink/target/debug/build/mavlink-3fa59b1cd37824f4/out/
development.rs

1#![doc = "MAVLink development dialect."]
2#![doc = ""]
3#![doc = "This file was automatically generated, do not edit."]
4#![allow(deprecated)]
5#[cfg(feature = "arbitrary")]
6use arbitrary::Arbitrary;
7#[allow(unused_imports)]
8use bitflags::{bitflags, Flags};
9use mavlink_core::{
10    bytes::Bytes, bytes_mut::BytesMut, types::CharArray, MavlinkVersion, Message, MessageData,
11};
12#[allow(unused_imports)]
13use num_derive::FromPrimitive;
14#[allow(unused_imports)]
15use num_derive::ToPrimitive;
16#[allow(unused_imports)]
17use num_traits::FromPrimitive;
18#[allow(unused_imports)]
19use num_traits::ToPrimitive;
20#[cfg(feature = "serde")]
21use serde::{Deserialize, Serialize};
22#[cfg(feature = "ts")]
23use ts_rs::TS;
24pub const MINOR_MAVLINK_VERSION: u8 = 0u8;
25pub const DIALECT_NUMBER: u8 = 0u8;
26#[cfg_attr(feature = "ts", derive(TS))]
27#[cfg_attr(feature = "ts", ts(export))]
28#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
29#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30#[cfg_attr(feature = "serde", serde(tag = "type"))]
31#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32#[repr(u32)]
33#[doc = "Actuator configuration, used to change a setting on an actuator. Component information metadata can be used to know which outputs support which commands."]
34pub enum ActuatorConfiguration {
35    #[doc = "Do nothing."]
36    ACTUATOR_CONFIGURATION_NONE = 0,
37    #[doc = "Command the actuator to beep now."]
38    ACTUATOR_CONFIGURATION_BEEP = 1,
39    #[doc = "Permanently set the actuator (ESC) to 3D mode (reversible thrust)."]
40    ACTUATOR_CONFIGURATION_3D_MODE_ON = 2,
41    #[doc = "Permanently set the actuator (ESC) to non 3D mode (non-reversible thrust)."]
42    ACTUATOR_CONFIGURATION_3D_MODE_OFF = 3,
43    #[doc = "Permanently set the actuator (ESC) to spin direction 1 (which can be clockwise or counter-clockwise)."]
44    ACTUATOR_CONFIGURATION_SPIN_DIRECTION1 = 4,
45    #[doc = "Permanently set the actuator (ESC) to spin direction 2 (opposite of direction 1)."]
46    ACTUATOR_CONFIGURATION_SPIN_DIRECTION2 = 5,
47}
48impl ActuatorConfiguration {
49    pub const DEFAULT: Self = Self::ACTUATOR_CONFIGURATION_NONE;
50}
51impl Default for ActuatorConfiguration {
52    fn default() -> Self {
53        Self::DEFAULT
54    }
55}
56#[cfg_attr(feature = "ts", derive(TS))]
57#[cfg_attr(feature = "ts", ts(export))]
58#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
59#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
60#[cfg_attr(feature = "serde", serde(tag = "type"))]
61#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
62#[repr(u32)]
63#[doc = "Actuator output function. Values greater or equal to 1000 are autopilot-specific."]
64pub enum ActuatorOutputFunction {
65    #[doc = "No function (disabled)."]
66    ACTUATOR_OUTPUT_FUNCTION_NONE = 0,
67    #[doc = "Motor 1"]
68    ACTUATOR_OUTPUT_FUNCTION_MOTOR1 = 1,
69    #[doc = "Motor 2"]
70    ACTUATOR_OUTPUT_FUNCTION_MOTOR2 = 2,
71    #[doc = "Motor 3"]
72    ACTUATOR_OUTPUT_FUNCTION_MOTOR3 = 3,
73    #[doc = "Motor 4"]
74    ACTUATOR_OUTPUT_FUNCTION_MOTOR4 = 4,
75    #[doc = "Motor 5"]
76    ACTUATOR_OUTPUT_FUNCTION_MOTOR5 = 5,
77    #[doc = "Motor 6"]
78    ACTUATOR_OUTPUT_FUNCTION_MOTOR6 = 6,
79    #[doc = "Motor 7"]
80    ACTUATOR_OUTPUT_FUNCTION_MOTOR7 = 7,
81    #[doc = "Motor 8"]
82    ACTUATOR_OUTPUT_FUNCTION_MOTOR8 = 8,
83    #[doc = "Motor 9"]
84    ACTUATOR_OUTPUT_FUNCTION_MOTOR9 = 9,
85    #[doc = "Motor 10"]
86    ACTUATOR_OUTPUT_FUNCTION_MOTOR10 = 10,
87    #[doc = "Motor 11"]
88    ACTUATOR_OUTPUT_FUNCTION_MOTOR11 = 11,
89    #[doc = "Motor 12"]
90    ACTUATOR_OUTPUT_FUNCTION_MOTOR12 = 12,
91    #[doc = "Motor 13"]
92    ACTUATOR_OUTPUT_FUNCTION_MOTOR13 = 13,
93    #[doc = "Motor 14"]
94    ACTUATOR_OUTPUT_FUNCTION_MOTOR14 = 14,
95    #[doc = "Motor 15"]
96    ACTUATOR_OUTPUT_FUNCTION_MOTOR15 = 15,
97    #[doc = "Motor 16"]
98    ACTUATOR_OUTPUT_FUNCTION_MOTOR16 = 16,
99    #[doc = "Servo 1"]
100    ACTUATOR_OUTPUT_FUNCTION_SERVO1 = 33,
101    #[doc = "Servo 2"]
102    ACTUATOR_OUTPUT_FUNCTION_SERVO2 = 34,
103    #[doc = "Servo 3"]
104    ACTUATOR_OUTPUT_FUNCTION_SERVO3 = 35,
105    #[doc = "Servo 4"]
106    ACTUATOR_OUTPUT_FUNCTION_SERVO4 = 36,
107    #[doc = "Servo 5"]
108    ACTUATOR_OUTPUT_FUNCTION_SERVO5 = 37,
109    #[doc = "Servo 6"]
110    ACTUATOR_OUTPUT_FUNCTION_SERVO6 = 38,
111    #[doc = "Servo 7"]
112    ACTUATOR_OUTPUT_FUNCTION_SERVO7 = 39,
113    #[doc = "Servo 8"]
114    ACTUATOR_OUTPUT_FUNCTION_SERVO8 = 40,
115    #[doc = "Servo 9"]
116    ACTUATOR_OUTPUT_FUNCTION_SERVO9 = 41,
117    #[doc = "Servo 10"]
118    ACTUATOR_OUTPUT_FUNCTION_SERVO10 = 42,
119    #[doc = "Servo 11"]
120    ACTUATOR_OUTPUT_FUNCTION_SERVO11 = 43,
121    #[doc = "Servo 12"]
122    ACTUATOR_OUTPUT_FUNCTION_SERVO12 = 44,
123    #[doc = "Servo 13"]
124    ACTUATOR_OUTPUT_FUNCTION_SERVO13 = 45,
125    #[doc = "Servo 14"]
126    ACTUATOR_OUTPUT_FUNCTION_SERVO14 = 46,
127    #[doc = "Servo 15"]
128    ACTUATOR_OUTPUT_FUNCTION_SERVO15 = 47,
129    #[doc = "Servo 16"]
130    ACTUATOR_OUTPUT_FUNCTION_SERVO16 = 48,
131}
132impl ActuatorOutputFunction {
133    pub const DEFAULT: Self = Self::ACTUATOR_OUTPUT_FUNCTION_NONE;
134}
135impl Default for ActuatorOutputFunction {
136    fn default() -> Self {
137        Self::DEFAULT
138    }
139}
140#[cfg_attr(feature = "ts", derive(TS))]
141#[cfg_attr(feature = "ts", ts(export))]
142#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
143#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
144#[cfg_attr(feature = "serde", serde(tag = "type"))]
145#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
146#[repr(u32)]
147#[doc = "Enumeration of the ADSB altimeter types"]
148pub enum AdsbAltitudeType {
149    #[doc = "Altitude reported from a Baro source using QNH reference"]
150    ADSB_ALTITUDE_TYPE_PRESSURE_QNH = 0,
151    #[doc = "Altitude reported from a GNSS source"]
152    ADSB_ALTITUDE_TYPE_GEOMETRIC = 1,
153}
154impl AdsbAltitudeType {
155    pub const DEFAULT: Self = Self::ADSB_ALTITUDE_TYPE_PRESSURE_QNH;
156}
157impl Default for AdsbAltitudeType {
158    fn default() -> Self {
159        Self::DEFAULT
160    }
161}
162#[cfg_attr(feature = "ts", derive(TS))]
163#[cfg_attr(feature = "ts", ts(export))]
164#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
165#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
166#[cfg_attr(feature = "serde", serde(tag = "type"))]
167#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
168#[repr(u32)]
169#[doc = "ADSB classification for the type of vehicle emitting the transponder signal"]
170pub enum AdsbEmitterType {
171    ADSB_EMITTER_TYPE_NO_INFO = 0,
172    ADSB_EMITTER_TYPE_LIGHT = 1,
173    ADSB_EMITTER_TYPE_SMALL = 2,
174    ADSB_EMITTER_TYPE_LARGE = 3,
175    ADSB_EMITTER_TYPE_HIGH_VORTEX_LARGE = 4,
176    ADSB_EMITTER_TYPE_HEAVY = 5,
177    ADSB_EMITTER_TYPE_HIGHLY_MANUV = 6,
178    ADSB_EMITTER_TYPE_ROTOCRAFT = 7,
179    ADSB_EMITTER_TYPE_UNASSIGNED = 8,
180    ADSB_EMITTER_TYPE_GLIDER = 9,
181    ADSB_EMITTER_TYPE_LIGHTER_AIR = 10,
182    ADSB_EMITTER_TYPE_PARACHUTE = 11,
183    ADSB_EMITTER_TYPE_ULTRA_LIGHT = 12,
184    ADSB_EMITTER_TYPE_UNASSIGNED2 = 13,
185    ADSB_EMITTER_TYPE_UAV = 14,
186    ADSB_EMITTER_TYPE_SPACE = 15,
187    ADSB_EMITTER_TYPE_UNASSGINED3 = 16,
188    ADSB_EMITTER_TYPE_EMERGENCY_SURFACE = 17,
189    ADSB_EMITTER_TYPE_SERVICE_SURFACE = 18,
190    ADSB_EMITTER_TYPE_POINT_OBSTACLE = 19,
191}
192impl AdsbEmitterType {
193    pub const DEFAULT: Self = Self::ADSB_EMITTER_TYPE_NO_INFO;
194}
195impl Default for AdsbEmitterType {
196    fn default() -> Self {
197        Self::DEFAULT
198    }
199}
200bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags indicate status such as data validity of each data source. Set = data valid"] pub struct AdsbFlags : u16 { const ADSB_FLAGS_VALID_COORDS = 1 ; const ADSB_FLAGS_VALID_ALTITUDE = 2 ; const ADSB_FLAGS_VALID_HEADING = 4 ; const ADSB_FLAGS_VALID_VELOCITY = 8 ; const ADSB_FLAGS_VALID_CALLSIGN = 16 ; const ADSB_FLAGS_VALID_SQUAWK = 32 ; const ADSB_FLAGS_SIMULATED = 64 ; const ADSB_FLAGS_VERTICAL_VELOCITY_VALID = 128 ; const ADSB_FLAGS_BARO_VALID = 256 ; const ADSB_FLAGS_SOURCE_UAT = 32768 ; } }
201impl AdsbFlags {
202    pub const DEFAULT: Self = Self::ADSB_FLAGS_VALID_COORDS;
203}
204impl Default for AdsbFlags {
205    fn default() -> Self {
206        Self::DEFAULT
207    }
208}
209bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Airspeed sensor flags"] pub struct AirspeedSensorFlags : u8 { # [doc = "Airspeed sensor is unhealthy"] const AIRSPEED_SENSOR_UNHEALTHY = 1 ; # [doc = "True if the data from this sensor is being actively used by the flight controller for guidance, navigation or control."] const AIRSPEED_SENSOR_USING = 2 ; } }
210impl AirspeedSensorFlags {
211    pub const DEFAULT: Self = Self::AIRSPEED_SENSOR_UNHEALTHY;
212}
213impl Default for AirspeedSensorFlags {
214    fn default() -> Self {
215        Self::DEFAULT
216    }
217}
218bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags are used in the AIS_VESSEL.fields bitmask to indicate validity of data in the other message fields. When set, the data is valid."] pub struct AisFlags : u16 { # [doc = "1 = Position accuracy less than 10m, 0 = position accuracy greater than 10m."] const AIS_FLAGS_POSITION_ACCURACY = 1 ; const AIS_FLAGS_VALID_COG = 2 ; const AIS_FLAGS_VALID_VELOCITY = 4 ; # [doc = "1 = Velocity over 52.5765m/s (102.2 knots)"] const AIS_FLAGS_HIGH_VELOCITY = 8 ; const AIS_FLAGS_VALID_TURN_RATE = 16 ; # [doc = "Only the sign of the returned turn rate value is valid, either greater than 5deg/30s or less than -5deg/30s"] const AIS_FLAGS_TURN_RATE_SIGN_ONLY = 32 ; const AIS_FLAGS_VALID_DIMENSIONS = 64 ; # [doc = "Distance to bow is larger than 511m"] const AIS_FLAGS_LARGE_BOW_DIMENSION = 128 ; # [doc = "Distance to stern is larger than 511m"] const AIS_FLAGS_LARGE_STERN_DIMENSION = 256 ; # [doc = "Distance to port side is larger than 63m"] const AIS_FLAGS_LARGE_PORT_DIMENSION = 512 ; # [doc = "Distance to starboard side is larger than 63m"] const AIS_FLAGS_LARGE_STARBOARD_DIMENSION = 1024 ; const AIS_FLAGS_VALID_CALLSIGN = 2048 ; const AIS_FLAGS_VALID_NAME = 4096 ; } }
219impl AisFlags {
220    pub const DEFAULT: Self = Self::AIS_FLAGS_POSITION_ACCURACY;
221}
222impl Default for AisFlags {
223    fn default() -> Self {
224        Self::DEFAULT
225    }
226}
227#[cfg_attr(feature = "ts", derive(TS))]
228#[cfg_attr(feature = "ts", ts(export))]
229#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
230#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
231#[cfg_attr(feature = "serde", serde(tag = "type"))]
232#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
233#[repr(u32)]
234#[doc = "Navigational status of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
235pub enum AisNavStatus {
236    #[doc = "Under way using engine."]
237    UNDER_WAY = 0,
238    AIS_NAV_ANCHORED = 1,
239    AIS_NAV_UN_COMMANDED = 2,
240    AIS_NAV_RESTRICTED_MANOEUVERABILITY = 3,
241    AIS_NAV_DRAUGHT_CONSTRAINED = 4,
242    AIS_NAV_MOORED = 5,
243    AIS_NAV_AGROUND = 6,
244    AIS_NAV_FISHING = 7,
245    AIS_NAV_SAILING = 8,
246    AIS_NAV_RESERVED_HSC = 9,
247    AIS_NAV_RESERVED_WIG = 10,
248    AIS_NAV_RESERVED_1 = 11,
249    AIS_NAV_RESERVED_2 = 12,
250    AIS_NAV_RESERVED_3 = 13,
251    #[doc = "Search And Rescue Transponder."]
252    AIS_NAV_AIS_SART = 14,
253    #[doc = "Not available (default)."]
254    AIS_NAV_UNKNOWN = 15,
255}
256impl AisNavStatus {
257    pub const DEFAULT: Self = Self::UNDER_WAY;
258}
259impl Default for AisNavStatus {
260    fn default() -> Self {
261        Self::DEFAULT
262    }
263}
264#[cfg_attr(feature = "ts", derive(TS))]
265#[cfg_attr(feature = "ts", ts(export))]
266#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
267#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
268#[cfg_attr(feature = "serde", serde(tag = "type"))]
269#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
270#[repr(u32)]
271#[doc = "Type of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
272pub enum AisType {
273    #[doc = "Not available (default)."]
274    AIS_TYPE_UNKNOWN = 0,
275    AIS_TYPE_RESERVED_1 = 1,
276    AIS_TYPE_RESERVED_2 = 2,
277    AIS_TYPE_RESERVED_3 = 3,
278    AIS_TYPE_RESERVED_4 = 4,
279    AIS_TYPE_RESERVED_5 = 5,
280    AIS_TYPE_RESERVED_6 = 6,
281    AIS_TYPE_RESERVED_7 = 7,
282    AIS_TYPE_RESERVED_8 = 8,
283    AIS_TYPE_RESERVED_9 = 9,
284    AIS_TYPE_RESERVED_10 = 10,
285    AIS_TYPE_RESERVED_11 = 11,
286    AIS_TYPE_RESERVED_12 = 12,
287    AIS_TYPE_RESERVED_13 = 13,
288    AIS_TYPE_RESERVED_14 = 14,
289    AIS_TYPE_RESERVED_15 = 15,
290    AIS_TYPE_RESERVED_16 = 16,
291    AIS_TYPE_RESERVED_17 = 17,
292    AIS_TYPE_RESERVED_18 = 18,
293    AIS_TYPE_RESERVED_19 = 19,
294    #[doc = "Wing In Ground effect."]
295    AIS_TYPE_WIG = 20,
296    AIS_TYPE_WIG_HAZARDOUS_A = 21,
297    AIS_TYPE_WIG_HAZARDOUS_B = 22,
298    AIS_TYPE_WIG_HAZARDOUS_C = 23,
299    AIS_TYPE_WIG_HAZARDOUS_D = 24,
300    AIS_TYPE_WIG_RESERVED_1 = 25,
301    AIS_TYPE_WIG_RESERVED_2 = 26,
302    AIS_TYPE_WIG_RESERVED_3 = 27,
303    AIS_TYPE_WIG_RESERVED_4 = 28,
304    AIS_TYPE_WIG_RESERVED_5 = 29,
305    AIS_TYPE_FISHING = 30,
306    AIS_TYPE_TOWING = 31,
307    #[doc = "Towing: length exceeds 200m or breadth exceeds 25m."]
308    AIS_TYPE_TOWING_LARGE = 32,
309    #[doc = "Dredging or other underwater ops."]
310    AIS_TYPE_DREDGING = 33,
311    AIS_TYPE_DIVING = 34,
312    AIS_TYPE_MILITARY = 35,
313    AIS_TYPE_SAILING = 36,
314    AIS_TYPE_PLEASURE = 37,
315    AIS_TYPE_RESERVED_20 = 38,
316    AIS_TYPE_RESERVED_21 = 39,
317    #[doc = "High Speed Craft."]
318    AIS_TYPE_HSC = 40,
319    AIS_TYPE_HSC_HAZARDOUS_A = 41,
320    AIS_TYPE_HSC_HAZARDOUS_B = 42,
321    AIS_TYPE_HSC_HAZARDOUS_C = 43,
322    AIS_TYPE_HSC_HAZARDOUS_D = 44,
323    AIS_TYPE_HSC_RESERVED_1 = 45,
324    AIS_TYPE_HSC_RESERVED_2 = 46,
325    AIS_TYPE_HSC_RESERVED_3 = 47,
326    AIS_TYPE_HSC_RESERVED_4 = 48,
327    AIS_TYPE_HSC_UNKNOWN = 49,
328    AIS_TYPE_PILOT = 50,
329    #[doc = "Search And Rescue vessel."]
330    AIS_TYPE_SAR = 51,
331    AIS_TYPE_TUG = 52,
332    AIS_TYPE_PORT_TENDER = 53,
333    #[doc = "Anti-pollution equipment."]
334    AIS_TYPE_ANTI_POLLUTION = 54,
335    AIS_TYPE_LAW_ENFORCEMENT = 55,
336    AIS_TYPE_SPARE_LOCAL_1 = 56,
337    AIS_TYPE_SPARE_LOCAL_2 = 57,
338    AIS_TYPE_MEDICAL_TRANSPORT = 58,
339    #[doc = "Noncombatant ship according to RR Resolution No. 18."]
340    AIS_TYPE_NONECOMBATANT = 59,
341    AIS_TYPE_PASSENGER = 60,
342    AIS_TYPE_PASSENGER_HAZARDOUS_A = 61,
343    AIS_TYPE_PASSENGER_HAZARDOUS_B = 62,
344    AIS_TYPE_PASSENGER_HAZARDOUS_C = 63,
345    AIS_TYPE_PASSENGER_HAZARDOUS_D = 64,
346    AIS_TYPE_PASSENGER_RESERVED_1 = 65,
347    AIS_TYPE_PASSENGER_RESERVED_2 = 66,
348    AIS_TYPE_PASSENGER_RESERVED_3 = 67,
349    AIS_TYPE_PASSENGER_RESERVED_4 = 68,
350    AIS_TYPE_PASSENGER_UNKNOWN = 69,
351    AIS_TYPE_CARGO = 70,
352    AIS_TYPE_CARGO_HAZARDOUS_A = 71,
353    AIS_TYPE_CARGO_HAZARDOUS_B = 72,
354    AIS_TYPE_CARGO_HAZARDOUS_C = 73,
355    AIS_TYPE_CARGO_HAZARDOUS_D = 74,
356    AIS_TYPE_CARGO_RESERVED_1 = 75,
357    AIS_TYPE_CARGO_RESERVED_2 = 76,
358    AIS_TYPE_CARGO_RESERVED_3 = 77,
359    AIS_TYPE_CARGO_RESERVED_4 = 78,
360    AIS_TYPE_CARGO_UNKNOWN = 79,
361    AIS_TYPE_TANKER = 80,
362    AIS_TYPE_TANKER_HAZARDOUS_A = 81,
363    AIS_TYPE_TANKER_HAZARDOUS_B = 82,
364    AIS_TYPE_TANKER_HAZARDOUS_C = 83,
365    AIS_TYPE_TANKER_HAZARDOUS_D = 84,
366    AIS_TYPE_TANKER_RESERVED_1 = 85,
367    AIS_TYPE_TANKER_RESERVED_2 = 86,
368    AIS_TYPE_TANKER_RESERVED_3 = 87,
369    AIS_TYPE_TANKER_RESERVED_4 = 88,
370    AIS_TYPE_TANKER_UNKNOWN = 89,
371    AIS_TYPE_OTHER = 90,
372    AIS_TYPE_OTHER_HAZARDOUS_A = 91,
373    AIS_TYPE_OTHER_HAZARDOUS_B = 92,
374    AIS_TYPE_OTHER_HAZARDOUS_C = 93,
375    AIS_TYPE_OTHER_HAZARDOUS_D = 94,
376    AIS_TYPE_OTHER_RESERVED_1 = 95,
377    AIS_TYPE_OTHER_RESERVED_2 = 96,
378    AIS_TYPE_OTHER_RESERVED_3 = 97,
379    AIS_TYPE_OTHER_RESERVED_4 = 98,
380    AIS_TYPE_OTHER_UNKNOWN = 99,
381}
382impl AisType {
383    pub const DEFAULT: Self = Self::AIS_TYPE_UNKNOWN;
384}
385impl Default for AisType {
386    fn default() -> Self {
387        Self::DEFAULT
388    }
389}
390bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b00000000 indicates that none of the setpoint dimensions should be ignored."] pub struct AttitudeTargetTypemask : u8 { # [doc = "Ignore body roll rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE = 1 ; # [doc = "Ignore body pitch rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_PITCH_RATE_IGNORE = 2 ; # [doc = "Ignore body yaw rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_YAW_RATE_IGNORE = 4 ; # [doc = "Use 3D body thrust setpoint instead of throttle"] const ATTITUDE_TARGET_TYPEMASK_THRUST_BODY_SET = 32 ; # [doc = "Ignore throttle"] const ATTITUDE_TARGET_TYPEMASK_THROTTLE_IGNORE = 64 ; # [doc = "Ignore attitude"] const ATTITUDE_TARGET_TYPEMASK_ATTITUDE_IGNORE = 128 ; } }
391impl AttitudeTargetTypemask {
392    pub const DEFAULT: Self = Self::ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE;
393}
394impl Default for AttitudeTargetTypemask {
395    fn default() -> Self {
396        Self::DEFAULT
397    }
398}
399#[cfg_attr(feature = "ts", derive(TS))]
400#[cfg_attr(feature = "ts", ts(export))]
401#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
402#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
403#[cfg_attr(feature = "serde", serde(tag = "type"))]
404#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
405#[repr(u32)]
406#[doc = "Axes that will be autotuned by MAV_CMD_DO_AUTOTUNE_ENABLE.         Note that at least one flag must be set in MAV_CMD_DO_AUTOTUNE_ENABLE.param2: if none are set, the flight stack will tune its default set of axes."]
407pub enum AutotuneAxis {
408    #[doc = "Autotune roll axis."]
409    AUTOTUNE_AXIS_ROLL = 1,
410    #[doc = "Autotune pitch axis."]
411    AUTOTUNE_AXIS_PITCH = 2,
412    #[doc = "Autotune yaw axis."]
413    AUTOTUNE_AXIS_YAW = 4,
414}
415impl AutotuneAxis {
416    pub const DEFAULT: Self = Self::AUTOTUNE_AXIS_ROLL;
417}
418impl Default for AutotuneAxis {
419    fn default() -> Self {
420        Self::DEFAULT
421    }
422}
423bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera capability flags (Bitmap)"] pub struct CameraCapFlags : u32 { # [doc = "Camera is able to record video"] const CAMERA_CAP_FLAGS_CAPTURE_VIDEO = 1 ; # [doc = "Camera is able to capture images"] const CAMERA_CAP_FLAGS_CAPTURE_IMAGE = 2 ; # [doc = "Camera has separate Video and Image/Photo modes (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_MODES = 4 ; # [doc = "Camera can capture images while in video mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_IMAGE_IN_VIDEO_MODE = 8 ; # [doc = "Camera can capture videos while in Photo/Image mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_VIDEO_IN_IMAGE_MODE = 16 ; # [doc = "Camera has image survey mode (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_IMAGE_SURVEY_MODE = 32 ; # [doc = "Camera has basic zoom control (MAV_CMD_SET_CAMERA_ZOOM)"] const CAMERA_CAP_FLAGS_HAS_BASIC_ZOOM = 64 ; # [doc = "Camera has basic focus control (MAV_CMD_SET_CAMERA_FOCUS)"] const CAMERA_CAP_FLAGS_HAS_BASIC_FOCUS = 128 ; # [doc = "Camera has video streaming capabilities (request VIDEO_STREAM_INFORMATION with MAV_CMD_REQUEST_MESSAGE for video streaming info)"] const CAMERA_CAP_FLAGS_HAS_VIDEO_STREAM = 256 ; # [doc = "Camera supports tracking of a point on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_POINT = 512 ; # [doc = "Camera supports tracking of a selection rectangle on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE = 1024 ; # [doc = "Camera supports tracking geo status (CAMERA_TRACKING_GEO_STATUS)."] const CAMERA_CAP_FLAGS_HAS_TRACKING_GEO_STATUS = 2048 ; # [doc = "Camera supports absolute thermal range (request CAMERA_THERMAL_RANGE with MAV_CMD_REQUEST_MESSAGE)."] const CAMERA_CAP_FLAGS_HAS_THERMAL_RANGE = 4096 ; } }
424impl CameraCapFlags {
425    pub const DEFAULT: Self = Self::CAMERA_CAP_FLAGS_CAPTURE_VIDEO;
426}
427impl Default for CameraCapFlags {
428    fn default() -> Self {
429        Self::DEFAULT
430    }
431}
432#[cfg_attr(feature = "ts", derive(TS))]
433#[cfg_attr(feature = "ts", ts(export))]
434#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
435#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
436#[cfg_attr(feature = "serde", serde(tag = "type"))]
437#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
438#[repr(u32)]
439#[doc = "Camera Modes."]
440pub enum CameraMode {
441    #[doc = "Camera is in image/photo capture mode."]
442    CAMERA_MODE_IMAGE = 0,
443    #[doc = "Camera is in video capture mode."]
444    CAMERA_MODE_VIDEO = 1,
445    #[doc = "Camera is in image survey capture mode. It allows for camera controller to do specific settings for surveys."]
446    CAMERA_MODE_IMAGE_SURVEY = 2,
447}
448impl CameraMode {
449    pub const DEFAULT: Self = Self::CAMERA_MODE_IMAGE;
450}
451impl Default for CameraMode {
452    fn default() -> Self {
453        Self::DEFAULT
454    }
455}
456#[cfg_attr(feature = "ts", derive(TS))]
457#[cfg_attr(feature = "ts", ts(export))]
458#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
459#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
460#[cfg_attr(feature = "serde", serde(tag = "type"))]
461#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
462#[repr(u32)]
463#[doc = "Camera sources for MAV_CMD_SET_CAMERA_SOURCE"]
464pub enum CameraSource {
465    #[doc = "Default camera source."]
466    CAMERA_SOURCE_DEFAULT = 0,
467    #[doc = "RGB camera source."]
468    CAMERA_SOURCE_RGB = 1,
469    #[doc = "IR camera source."]
470    CAMERA_SOURCE_IR = 2,
471    #[doc = "NDVI camera source."]
472    CAMERA_SOURCE_NDVI = 3,
473}
474impl CameraSource {
475    pub const DEFAULT: Self = Self::CAMERA_SOURCE_DEFAULT;
476}
477impl Default for CameraSource {
478    fn default() -> Self {
479        Self::DEFAULT
480    }
481}
482#[cfg_attr(feature = "ts", derive(TS))]
483#[cfg_attr(feature = "ts", ts(export))]
484#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
485#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
486#[cfg_attr(feature = "serde", serde(tag = "type"))]
487#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
488#[repr(u32)]
489#[doc = "Camera tracking modes"]
490pub enum CameraTrackingMode {
491    #[doc = "Not tracking"]
492    CAMERA_TRACKING_MODE_NONE = 0,
493    #[doc = "Target is a point"]
494    CAMERA_TRACKING_MODE_POINT = 1,
495    #[doc = "Target is a rectangle"]
496    CAMERA_TRACKING_MODE_RECTANGLE = 2,
497}
498impl CameraTrackingMode {
499    pub const DEFAULT: Self = Self::CAMERA_TRACKING_MODE_NONE;
500}
501impl Default for CameraTrackingMode {
502    fn default() -> Self {
503        Self::DEFAULT
504    }
505}
506#[cfg_attr(feature = "ts", derive(TS))]
507#[cfg_attr(feature = "ts", ts(export))]
508#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
509#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
510#[cfg_attr(feature = "serde", serde(tag = "type"))]
511#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
512#[repr(u32)]
513#[doc = "Camera tracking status flags"]
514pub enum CameraTrackingStatusFlags {
515    #[doc = "Camera is not tracking"]
516    CAMERA_TRACKING_STATUS_FLAGS_IDLE = 0,
517    #[doc = "Camera is tracking"]
518    CAMERA_TRACKING_STATUS_FLAGS_ACTIVE = 1,
519    #[doc = "Camera tracking in error state"]
520    CAMERA_TRACKING_STATUS_FLAGS_ERROR = 2,
521}
522impl CameraTrackingStatusFlags {
523    pub const DEFAULT: Self = Self::CAMERA_TRACKING_STATUS_FLAGS_IDLE;
524}
525impl Default for CameraTrackingStatusFlags {
526    fn default() -> Self {
527        Self::DEFAULT
528    }
529}
530bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera tracking target data (shows where tracked target is within image)"] pub struct CameraTrackingTargetData : u8 { # [doc = "Target data embedded in image data (proprietary)"] const CAMERA_TRACKING_TARGET_DATA_EMBEDDED = 1 ; # [doc = "Target data rendered in image"] const CAMERA_TRACKING_TARGET_DATA_RENDERED = 2 ; # [doc = "Target data within status message (Point or Rectangle)"] const CAMERA_TRACKING_TARGET_DATA_IN_STATUS = 4 ; } }
531impl CameraTrackingTargetData {
532    pub const DEFAULT: Self = Self::CAMERA_TRACKING_TARGET_DATA_EMBEDDED;
533}
534impl Default for CameraTrackingTargetData {
535    fn default() -> Self {
536        Self::DEFAULT
537    }
538}
539#[cfg_attr(feature = "ts", derive(TS))]
540#[cfg_attr(feature = "ts", ts(export))]
541#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
542#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
543#[cfg_attr(feature = "serde", serde(tag = "type"))]
544#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
545#[repr(u32)]
546#[doc = "Zoom types for MAV_CMD_SET_CAMERA_ZOOM"]
547pub enum CameraZoomType {
548    #[doc = "Zoom one step increment (-1 for wide, 1 for tele)"]
549    ZOOM_TYPE_STEP = 0,
550    #[doc = "Continuous normalized zoom in/out rate until stopped. Range -1..1, negative: wide, positive: narrow/tele, 0 to stop zooming. Other values should be clipped to the range."]
551    ZOOM_TYPE_CONTINUOUS = 1,
552    #[doc = "Zoom value as proportion of full camera range (a percentage value between 0.0 and 100.0)"]
553    ZOOM_TYPE_RANGE = 2,
554    #[doc = "Zoom value/variable focal length in millimetres. Note that there is no message to get the valid zoom range of the camera, so this can type can only be used for cameras where the zoom range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)"]
555    ZOOM_TYPE_FOCAL_LENGTH = 3,
556    #[doc = "Zoom value as horizontal field of view in degrees."]
557    ZOOM_TYPE_HORIZONTAL_FOV = 4,
558}
559impl CameraZoomType {
560    pub const DEFAULT: Self = Self::ZOOM_TYPE_STEP;
561}
562impl Default for CameraZoomType {
563    fn default() -> Self {
564        Self::DEFAULT
565    }
566}
567#[cfg_attr(feature = "ts", derive(TS))]
568#[cfg_attr(feature = "ts", ts(export))]
569#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
570#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
571#[cfg_attr(feature = "serde", serde(tag = "type"))]
572#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
573#[repr(u32)]
574pub enum CanFilterOp {
575    CAN_FILTER_REPLACE = 0,
576    CAN_FILTER_ADD = 1,
577    CAN_FILTER_REMOVE = 2,
578}
579impl CanFilterOp {
580    pub const DEFAULT: Self = Self::CAN_FILTER_REPLACE;
581}
582impl Default for CanFilterOp {
583    fn default() -> Self {
584        Self::DEFAULT
585    }
586}
587#[cfg_attr(feature = "ts", derive(TS))]
588#[cfg_attr(feature = "ts", ts(export))]
589#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
590#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
591#[cfg_attr(feature = "serde", serde(tag = "type"))]
592#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
593#[repr(u32)]
594#[doc = "Possible responses from a CELLULAR_CONFIG message."]
595pub enum CellularConfigResponse {
596    #[doc = "Changes accepted."]
597    CELLULAR_CONFIG_RESPONSE_ACCEPTED = 0,
598    #[doc = "Invalid APN."]
599    CELLULAR_CONFIG_RESPONSE_APN_ERROR = 1,
600    #[doc = "Invalid PIN."]
601    CELLULAR_CONFIG_RESPONSE_PIN_ERROR = 2,
602    #[doc = "Changes rejected."]
603    CELLULAR_CONFIG_RESPONSE_REJECTED = 3,
604    #[doc = "PUK is required to unblock SIM card."]
605    CELLULAR_CONFIG_BLOCKED_PUK_REQUIRED = 4,
606}
607impl CellularConfigResponse {
608    pub const DEFAULT: Self = Self::CELLULAR_CONFIG_RESPONSE_ACCEPTED;
609}
610impl Default for CellularConfigResponse {
611    fn default() -> Self {
612        Self::DEFAULT
613    }
614}
615#[cfg_attr(feature = "ts", derive(TS))]
616#[cfg_attr(feature = "ts", ts(export))]
617#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
618#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
619#[cfg_attr(feature = "serde", serde(tag = "type"))]
620#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
621#[repr(u32)]
622#[doc = "These flags are used to diagnose the failure state of CELLULAR_STATUS"]
623pub enum CellularNetworkFailedReason {
624    #[doc = "No error"]
625    CELLULAR_NETWORK_FAILED_REASON_NONE = 0,
626    #[doc = "Error state is unknown"]
627    CELLULAR_NETWORK_FAILED_REASON_UNKNOWN = 1,
628    #[doc = "SIM is required for the modem but missing"]
629    CELLULAR_NETWORK_FAILED_REASON_SIM_MISSING = 2,
630    #[doc = "SIM is available, but not usable for connection"]
631    CELLULAR_NETWORK_FAILED_REASON_SIM_ERROR = 3,
632}
633impl CellularNetworkFailedReason {
634    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_FAILED_REASON_NONE;
635}
636impl Default for CellularNetworkFailedReason {
637    fn default() -> Self {
638        Self::DEFAULT
639    }
640}
641#[cfg_attr(feature = "ts", derive(TS))]
642#[cfg_attr(feature = "ts", ts(export))]
643#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
644#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
645#[cfg_attr(feature = "serde", serde(tag = "type"))]
646#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
647#[repr(u32)]
648#[doc = "Cellular network radio type"]
649pub enum CellularNetworkRadioType {
650    CELLULAR_NETWORK_RADIO_TYPE_NONE = 0,
651    CELLULAR_NETWORK_RADIO_TYPE_GSM = 1,
652    CELLULAR_NETWORK_RADIO_TYPE_CDMA = 2,
653    CELLULAR_NETWORK_RADIO_TYPE_WCDMA = 3,
654    CELLULAR_NETWORK_RADIO_TYPE_LTE = 4,
655}
656impl CellularNetworkRadioType {
657    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_RADIO_TYPE_NONE;
658}
659impl Default for CellularNetworkRadioType {
660    fn default() -> Self {
661        Self::DEFAULT
662    }
663}
664#[cfg_attr(feature = "ts", derive(TS))]
665#[cfg_attr(feature = "ts", ts(export))]
666#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
667#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
668#[cfg_attr(feature = "serde", serde(tag = "type"))]
669#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
670#[repr(u32)]
671#[doc = "These flags encode the cellular network status"]
672pub enum CellularStatusFlag {
673    #[doc = "State unknown or not reportable."]
674    CELLULAR_STATUS_FLAG_UNKNOWN = 0,
675    #[doc = "Modem is unusable"]
676    CELLULAR_STATUS_FLAG_FAILED = 1,
677    #[doc = "Modem is being initialized"]
678    CELLULAR_STATUS_FLAG_INITIALIZING = 2,
679    #[doc = "Modem is locked"]
680    CELLULAR_STATUS_FLAG_LOCKED = 3,
681    #[doc = "Modem is not enabled and is powered down"]
682    CELLULAR_STATUS_FLAG_DISABLED = 4,
683    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_DISABLED state"]
684    CELLULAR_STATUS_FLAG_DISABLING = 5,
685    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_ENABLED state"]
686    CELLULAR_STATUS_FLAG_ENABLING = 6,
687    #[doc = "Modem is enabled and powered on but not registered with a network provider and not available for data connections"]
688    CELLULAR_STATUS_FLAG_ENABLED = 7,
689    #[doc = "Modem is searching for a network provider to register"]
690    CELLULAR_STATUS_FLAG_SEARCHING = 8,
691    #[doc = "Modem is registered with a network provider, and data connections and messaging may be available for use"]
692    CELLULAR_STATUS_FLAG_REGISTERED = 9,
693    #[doc = "Modem is disconnecting and deactivating the last active packet data bearer. This state will not be entered if more than one packet data bearer is active and one of the active bearers is deactivated"]
694    CELLULAR_STATUS_FLAG_DISCONNECTING = 10,
695    #[doc = "Modem is activating and connecting the first packet data bearer. Subsequent bearer activations when another bearer is already active do not cause this state to be entered"]
696    CELLULAR_STATUS_FLAG_CONNECTING = 11,
697    #[doc = "One or more packet data bearers is active and connected"]
698    CELLULAR_STATUS_FLAG_CONNECTED = 12,
699}
700impl CellularStatusFlag {
701    pub const DEFAULT: Self = Self::CELLULAR_STATUS_FLAG_UNKNOWN;
702}
703impl Default for CellularStatusFlag {
704    fn default() -> Self {
705        Self::DEFAULT
706    }
707}
708#[cfg_attr(feature = "ts", derive(TS))]
709#[cfg_attr(feature = "ts", ts(export))]
710#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
711#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
712#[cfg_attr(feature = "serde", serde(tag = "type"))]
713#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
714#[repr(u32)]
715#[doc = "Supported component metadata types. These are used in the \"general\" metadata file returned by COMPONENT_METADATA to provide information about supported metadata types. The types are not used directly in MAVLink messages."]
716pub enum CompMetadataType {
717    #[doc = "General information about the component. General metadata includes information about other metadata types supported by the component. Files of this type must be supported, and must be downloadable from vehicle using a MAVLink FTP URI."]
718    COMP_METADATA_TYPE_GENERAL = 0,
719    #[doc = "Parameter meta data."]
720    COMP_METADATA_TYPE_PARAMETER = 1,
721    #[doc = "Meta data that specifies which commands and command parameters the vehicle supports. (WIP)"]
722    COMP_METADATA_TYPE_COMMANDS = 2,
723    #[doc = "Meta data that specifies external non-MAVLink peripherals."]
724    COMP_METADATA_TYPE_PERIPHERALS = 3,
725    #[doc = "Meta data for the events interface."]
726    COMP_METADATA_TYPE_EVENTS = 4,
727    #[doc = "Meta data for actuator configuration (motors, servos and vehicle geometry) and testing."]
728    COMP_METADATA_TYPE_ACTUATORS = 5,
729}
730impl CompMetadataType {
731    pub const DEFAULT: Self = Self::COMP_METADATA_TYPE_GENERAL;
732}
733impl Default for CompMetadataType {
734    fn default() -> Self {
735        Self::DEFAULT
736    }
737}
738#[cfg_attr(feature = "ts", derive(TS))]
739#[cfg_attr(feature = "ts", ts(export))]
740#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
741#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
742#[cfg_attr(feature = "serde", serde(tag = "type"))]
743#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
744#[repr(u32)]
745#[doc = "Indicates the ESC connection type."]
746pub enum EscConnectionType {
747    #[doc = "Traditional PPM ESC."]
748    ESC_CONNECTION_TYPE_PPM = 0,
749    #[doc = "Serial Bus connected ESC."]
750    ESC_CONNECTION_TYPE_SERIAL = 1,
751    #[doc = "One Shot PPM ESC."]
752    ESC_CONNECTION_TYPE_ONESHOT = 2,
753    #[doc = "I2C ESC."]
754    ESC_CONNECTION_TYPE_I2C = 3,
755    #[doc = "CAN-Bus ESC."]
756    ESC_CONNECTION_TYPE_CAN = 4,
757    #[doc = "DShot ESC."]
758    ESC_CONNECTION_TYPE_DSHOT = 5,
759}
760impl EscConnectionType {
761    pub const DEFAULT: Self = Self::ESC_CONNECTION_TYPE_PPM;
762}
763impl Default for EscConnectionType {
764    fn default() -> Self {
765        Self::DEFAULT
766    }
767}
768bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report ESC failures."] pub struct EscFailureFlags : u16 { # [doc = "Over current failure."] const ESC_FAILURE_OVER_CURRENT = 1 ; # [doc = "Over voltage failure."] const ESC_FAILURE_OVER_VOLTAGE = 2 ; # [doc = "Over temperature failure."] const ESC_FAILURE_OVER_TEMPERATURE = 4 ; # [doc = "Over RPM failure."] const ESC_FAILURE_OVER_RPM = 8 ; # [doc = "Inconsistent command failure i.e. out of bounds."] const ESC_FAILURE_INCONSISTENT_CMD = 16 ; # [doc = "Motor stuck failure."] const ESC_FAILURE_MOTOR_STUCK = 32 ; # [doc = "Generic ESC failure."] const ESC_FAILURE_GENERIC = 64 ; } }
769impl EscFailureFlags {
770    pub const DEFAULT: Self = Self::ESC_FAILURE_OVER_CURRENT;
771}
772impl Default for EscFailureFlags {
773    fn default() -> Self {
774        Self::DEFAULT
775    }
776}
777bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in ESTIMATOR_STATUS message"] pub struct EstimatorStatusFlags : u16 { # [doc = "True if the attitude estimate is good"] const ESTIMATOR_ATTITUDE = 1 ; # [doc = "True if the horizontal velocity estimate is good"] const ESTIMATOR_VELOCITY_HORIZ = 2 ; # [doc = "True if the  vertical velocity estimate is good"] const ESTIMATOR_VELOCITY_VERT = 4 ; # [doc = "True if the horizontal position (relative) estimate is good"] const ESTIMATOR_POS_HORIZ_REL = 8 ; # [doc = "True if the horizontal position (absolute) estimate is good"] const ESTIMATOR_POS_HORIZ_ABS = 16 ; # [doc = "True if the vertical position (absolute) estimate is good"] const ESTIMATOR_POS_VERT_ABS = 32 ; # [doc = "True if the vertical position (above ground) estimate is good"] const ESTIMATOR_POS_VERT_AGL = 64 ; # [doc = "True if the EKF is in a constant position mode and is not using external measurements (eg GPS or optical flow)"] const ESTIMATOR_CONST_POS_MODE = 128 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (relative) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_REL = 256 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (absolute) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_ABS = 512 ; # [doc = "True if the EKF has detected a GPS glitch"] const ESTIMATOR_GPS_GLITCH = 1024 ; # [doc = "True if the EKF has detected bad accelerometer data"] const ESTIMATOR_ACCEL_ERROR = 2048 ; } }
778impl EstimatorStatusFlags {
779    pub const DEFAULT: Self = Self::ESTIMATOR_ATTITUDE;
780}
781impl Default for EstimatorStatusFlags {
782    fn default() -> Self {
783        Self::DEFAULT
784    }
785}
786#[cfg_attr(feature = "ts", derive(TS))]
787#[cfg_attr(feature = "ts", ts(export))]
788#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
789#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
790#[cfg_attr(feature = "serde", serde(tag = "type"))]
791#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
792#[repr(u32)]
793#[doc = "List of possible failure type to inject."]
794pub enum FailureType {
795    #[doc = "No failure injected, used to reset a previous failure."]
796    FAILURE_TYPE_OK = 0,
797    #[doc = "Sets unit off, so completely non-responsive."]
798    FAILURE_TYPE_OFF = 1,
799    #[doc = "Unit is stuck e.g. keeps reporting the same value."]
800    FAILURE_TYPE_STUCK = 2,
801    #[doc = "Unit is reporting complete garbage."]
802    FAILURE_TYPE_GARBAGE = 3,
803    #[doc = "Unit is consistently wrong."]
804    FAILURE_TYPE_WRONG = 4,
805    #[doc = "Unit is slow, so e.g. reporting at slower than expected rate."]
806    FAILURE_TYPE_SLOW = 5,
807    #[doc = "Data of unit is delayed in time."]
808    FAILURE_TYPE_DELAYED = 6,
809    #[doc = "Unit is sometimes working, sometimes not."]
810    FAILURE_TYPE_INTERMITTENT = 7,
811}
812impl FailureType {
813    pub const DEFAULT: Self = Self::FAILURE_TYPE_OK;
814}
815impl Default for FailureType {
816    fn default() -> Self {
817        Self::DEFAULT
818    }
819}
820#[cfg_attr(feature = "ts", derive(TS))]
821#[cfg_attr(feature = "ts", ts(export))]
822#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
823#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
824#[cfg_attr(feature = "serde", serde(tag = "type"))]
825#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
826#[repr(u32)]
827#[doc = "List of possible units where failures can be injected."]
828pub enum FailureUnit {
829    FAILURE_UNIT_SENSOR_GYRO = 0,
830    FAILURE_UNIT_SENSOR_ACCEL = 1,
831    FAILURE_UNIT_SENSOR_MAG = 2,
832    FAILURE_UNIT_SENSOR_BARO = 3,
833    FAILURE_UNIT_SENSOR_GPS = 4,
834    FAILURE_UNIT_SENSOR_OPTICAL_FLOW = 5,
835    FAILURE_UNIT_SENSOR_VIO = 6,
836    FAILURE_UNIT_SENSOR_DISTANCE_SENSOR = 7,
837    FAILURE_UNIT_SENSOR_AIRSPEED = 8,
838    FAILURE_UNIT_SYSTEM_BATTERY = 100,
839    FAILURE_UNIT_SYSTEM_MOTOR = 101,
840    FAILURE_UNIT_SYSTEM_SERVO = 102,
841    FAILURE_UNIT_SYSTEM_AVOIDANCE = 103,
842    FAILURE_UNIT_SYSTEM_RC_SIGNAL = 104,
843    FAILURE_UNIT_SYSTEM_MAVLINK_SIGNAL = 105,
844}
845impl FailureUnit {
846    pub const DEFAULT: Self = Self::FAILURE_UNIT_SENSOR_GYRO;
847}
848impl Default for FailureUnit {
849    fn default() -> Self {
850        Self::DEFAULT
851    }
852}
853#[cfg_attr(feature = "ts", derive(TS))]
854#[cfg_attr(feature = "ts", ts(export))]
855#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
856#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
857#[cfg_attr(feature = "serde", serde(tag = "type"))]
858#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
859#[repr(u32)]
860pub enum FenceBreach {
861    #[doc = "No last fence breach"]
862    FENCE_BREACH_NONE = 0,
863    #[doc = "Breached minimum altitude"]
864    FENCE_BREACH_MINALT = 1,
865    #[doc = "Breached maximum altitude"]
866    FENCE_BREACH_MAXALT = 2,
867    #[doc = "Breached fence boundary"]
868    FENCE_BREACH_BOUNDARY = 3,
869}
870impl FenceBreach {
871    pub const DEFAULT: Self = Self::FENCE_BREACH_NONE;
872}
873impl Default for FenceBreach {
874    fn default() -> Self {
875        Self::DEFAULT
876    }
877}
878#[cfg_attr(feature = "ts", derive(TS))]
879#[cfg_attr(feature = "ts", ts(export))]
880#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
881#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
882#[cfg_attr(feature = "serde", serde(tag = "type"))]
883#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
884#[repr(u32)]
885#[doc = "Actions being taken to mitigate/prevent fence breach"]
886pub enum FenceMitigate {
887    #[doc = "Unknown"]
888    FENCE_MITIGATE_UNKNOWN = 0,
889    #[doc = "No actions being taken"]
890    FENCE_MITIGATE_NONE = 1,
891    #[doc = "Velocity limiting active to prevent breach"]
892    FENCE_MITIGATE_VEL_LIMIT = 2,
893}
894impl FenceMitigate {
895    pub const DEFAULT: Self = Self::FENCE_MITIGATE_UNKNOWN;
896}
897impl Default for FenceMitigate {
898    fn default() -> Self {
899        Self::DEFAULT
900    }
901}
902#[cfg_attr(feature = "ts", derive(TS))]
903#[cfg_attr(feature = "ts", ts(export))]
904#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
905#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
906#[cfg_attr(feature = "serde", serde(tag = "type"))]
907#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
908#[repr(u32)]
909#[doc = "Fence types to enable or disable when using MAV_CMD_DO_FENCE_ENABLE.         Note that at least one of these flags must be set in MAV_CMD_DO_FENCE_ENABLE.param2.         If none are set, the flight stack will ignore the field and enable/disable its default set of fences (usually all of them)."]
910pub enum FenceType {
911    #[doc = "Maximum altitude fence"]
912    FENCE_TYPE_ALT_MAX = 1,
913    #[doc = "Circle fence"]
914    FENCE_TYPE_CIRCLE = 2,
915    #[doc = "Polygon fence"]
916    FENCE_TYPE_POLYGON = 4,
917    #[doc = "Minimum altitude fence"]
918    FENCE_TYPE_ALT_MIN = 8,
919}
920impl FenceType {
921    pub const DEFAULT: Self = Self::FENCE_TYPE_ALT_MAX;
922}
923impl Default for FenceType {
924    fn default() -> Self {
925        Self::DEFAULT
926    }
927}
928#[cfg_attr(feature = "ts", derive(TS))]
929#[cfg_attr(feature = "ts", ts(export))]
930#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
931#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
932#[cfg_attr(feature = "serde", serde(tag = "type"))]
933#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
934#[repr(u32)]
935#[doc = "These values define the type of firmware release.  These values indicate the first version or release of this type.  For example the first alpha release would be 64, the second would be 65."]
936pub enum FirmwareVersionType {
937    #[doc = "development release"]
938    FIRMWARE_VERSION_TYPE_DEV = 0,
939    #[doc = "alpha release"]
940    FIRMWARE_VERSION_TYPE_ALPHA = 64,
941    #[doc = "beta release"]
942    FIRMWARE_VERSION_TYPE_BETA = 128,
943    #[doc = "release candidate"]
944    FIRMWARE_VERSION_TYPE_RC = 192,
945    #[doc = "official stable release"]
946    FIRMWARE_VERSION_TYPE_OFFICIAL = 255,
947}
948impl FirmwareVersionType {
949    pub const DEFAULT: Self = Self::FIRMWARE_VERSION_TYPE_DEV;
950}
951impl Default for FirmwareVersionType {
952    fn default() -> Self {
953        Self::DEFAULT
954    }
955}
956bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "CONTROL_STATUS flags."] pub struct GcsControlStatusFlags : u8 { # [doc = "If set, this CONTROL_STATUS publishes the controlling GCS for the whole system. If unset, the CONTROL_STATUS indicates the controlling GCS for just the component emitting the message. Note that to request control of the system a GCS should send MAV_CMD_REQUEST_OPERATOR_CONTROL to the component emitting CONTROL_STATUS with this flag set."] const GCS_CONTROL_STATUS_FLAGS_SYSTEM_MANAGER = 1 ; # [doc = "Takeover allowed (requests for control will be granted). If not set requests for control will be rejected, but the controlling GCS will be notified (and may release control or allow takeover)."] const GCS_CONTROL_STATUS_FLAGS_TAKEOVER_ALLOWED = 2 ; } }
957impl GcsControlStatusFlags {
958    pub const DEFAULT: Self = Self::GCS_CONTROL_STATUS_FLAGS_SYSTEM_MANAGER;
959}
960impl Default for GcsControlStatusFlags {
961    fn default() -> Self {
962        Self::DEFAULT
963    }
964}
965bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) capability flags (bitmap)."] pub struct GimbalDeviceCapFlags : u16 { # [doc = "Gimbal device supports a retracted position."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Gimbal device supports a horizontal, forward looking position, stabilized."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Gimbal device supports rotating around roll axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Gimbal device supports to follow a roll angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Gimbal device supports locking to a roll angle (generally that's the default with roll stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Gimbal device supports rotating around pitch axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Gimbal device supports to follow a pitch angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Gimbal device supports locking to a pitch angle (generally that's the default with pitch stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Gimbal device supports rotating around yaw axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Gimbal device supports to follow a yaw angle relative to the vehicle (generally that's the default)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Gimbal device supports locking to an absolute heading, i.e., yaw angle relative to North (earth frame, often this is an option available)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Gimbal device supports yawing/panning infinitely (e.g. using slip disk)."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Gimbal device supports yaw angles and angular velocities relative to North (earth frame). This usually requires support by an autopilot via AUTOPILOT_STATE_FOR_GIMBAL_DEVICE. Support can go on and off during runtime, which is reported by the flag GIMBAL_DEVICE_FLAGS_CAN_ACCEPT_YAW_IN_EARTH_FRAME."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Gimbal device supports radio control inputs as an alternative input for controlling the gimbal orientation."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; } }
966impl GimbalDeviceCapFlags {
967    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT;
968}
969impl Default for GimbalDeviceCapFlags {
970    fn default() -> Self {
971        Self::DEFAULT
972    }
973}
974bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) error flags (bitmap, 0 means no error)"] pub struct GimbalDeviceErrorFlags : u32 { # [doc = "Gimbal device is limited by hardware roll limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT = 1 ; # [doc = "Gimbal device is limited by hardware pitch limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_PITCH_LIMIT = 2 ; # [doc = "Gimbal device is limited by hardware yaw limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_YAW_LIMIT = 4 ; # [doc = "There is an error with the gimbal encoders."] const GIMBAL_DEVICE_ERROR_FLAGS_ENCODER_ERROR = 8 ; # [doc = "There is an error with the gimbal power source."] const GIMBAL_DEVICE_ERROR_FLAGS_POWER_ERROR = 16 ; # [doc = "There is an error with the gimbal motors."] const GIMBAL_DEVICE_ERROR_FLAGS_MOTOR_ERROR = 32 ; # [doc = "There is an error with the gimbal's software."] const GIMBAL_DEVICE_ERROR_FLAGS_SOFTWARE_ERROR = 64 ; # [doc = "There is an error with the gimbal's communication."] const GIMBAL_DEVICE_ERROR_FLAGS_COMMS_ERROR = 128 ; # [doc = "Gimbal device is currently calibrating."] const GIMBAL_DEVICE_ERROR_FLAGS_CALIBRATION_RUNNING = 256 ; # [doc = "Gimbal device is not assigned to a gimbal manager."] const GIMBAL_DEVICE_ERROR_FLAGS_NO_MANAGER = 512 ; } }
975impl GimbalDeviceErrorFlags {
976    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT;
977}
978impl Default for GimbalDeviceErrorFlags {
979    fn default() -> Self {
980        Self::DEFAULT
981    }
982}
983bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for gimbal device (lower level) operation."] pub struct GimbalDeviceFlags : u16 { # [doc = "Set to retracted safe position (no stabilization), takes precedence over all other flags."] const GIMBAL_DEVICE_FLAGS_RETRACT = 1 ; # [doc = "Set to neutral/default position, taking precedence over all other flags except RETRACT. Neutral is commonly forward-facing and horizontal (roll=pitch=yaw=0) but may be any orientation."] const GIMBAL_DEVICE_FLAGS_NEUTRAL = 2 ; # [doc = "Lock roll angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_ROLL_LOCK = 4 ; # [doc = "Lock pitch angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_PITCH_LOCK = 8 ; # [doc = "Lock yaw angle to absolute angle relative to North (not relative to vehicle). If this flag is set, the yaw angle and z component of angular velocity are relative to North (earth frame, x-axis pointing North), else they are relative to the vehicle heading (vehicle frame, earth frame rotated so that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_LOCK = 16 ; # [doc = "Yaw angle and z component of angular velocity are relative to the vehicle heading (vehicle frame, earth frame rotated such that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Yaw angle and z component of angular velocity are relative to North (earth frame, x-axis is pointing North)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Gimbal device can accept yaw angle inputs relative to North (earth frame). This flag is only for reporting (attempts to set this flag are ignored)."] const GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "The gimbal orientation is set exclusively by the RC signals feed to the gimbal's radio control inputs. MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE) are ignored."] const GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "The gimbal orientation is determined by combining/mixing the RC signals feed to the gimbal's radio control inputs and the MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE). How these two controls are combined or mixed is not defined by the protocol but is up to the implementation."] const GIMBAL_DEVICE_FLAGS_RC_MIXED = 512 ; } }
984impl GimbalDeviceFlags {
985    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_FLAGS_RETRACT;
986}
987impl Default for GimbalDeviceFlags {
988    fn default() -> Self {
989        Self::DEFAULT
990    }
991}
992bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal manager high level capability flags (bitmap). The first 16 bits are identical to the GIMBAL_DEVICE_CAP_FLAGS. However, the gimbal manager does not need to copy the flags from the gimbal but can also enhance the capabilities and thus add flags."] pub struct GimbalManagerCapFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; # [doc = "Gimbal manager supports to point to a local position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_LOCAL = 65536 ; # [doc = "Gimbal manager supports to point to a global latitude, longitude, altitude position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_GLOBAL = 131072 ; } }
993impl GimbalManagerCapFlags {
994    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT;
995}
996impl Default for GimbalManagerCapFlags {
997    fn default() -> Self {
998        Self::DEFAULT
999    }
1000}
1001bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for high level gimbal manager operation The first 16 bits are identical to the GIMBAL_DEVICE_FLAGS."] pub struct GimbalManagerFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_FLAGS_RETRACT."] const GIMBAL_MANAGER_FLAGS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_NEUTRAL."] const GIMBAL_MANAGER_FLAGS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ROLL_LOCK."] const GIMBAL_MANAGER_FLAGS_ROLL_LOCK = 4 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_PITCH_LOCK."] const GIMBAL_MANAGER_FLAGS_PITCH_LOCK = 8 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_LOCK."] const GIMBAL_MANAGER_FLAGS_YAW_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE."] const GIMBAL_MANAGER_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_MIXED."] const GIMBAL_MANAGER_FLAGS_RC_MIXED = 512 ; } }
1002impl GimbalManagerFlags {
1003    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_FLAGS_RETRACT;
1004}
1005impl Default for GimbalManagerFlags {
1006    fn default() -> Self {
1007        Self::DEFAULT
1008    }
1009}
1010#[cfg_attr(feature = "ts", derive(TS))]
1011#[cfg_attr(feature = "ts", ts(export))]
1012#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1013#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1014#[cfg_attr(feature = "serde", serde(tag = "type"))]
1015#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1016#[repr(u32)]
1017#[doc = "Signal authentication state in a GPS receiver."]
1018pub enum GpsAuthenticationState {
1019    #[doc = "The GPS receiver does not provide GPS signal authentication info."]
1020    GPS_AUTHENTICATION_STATE_UNKNOWN = 0,
1021    #[doc = "The GPS receiver is initializing signal authentication."]
1022    GPS_AUTHENTICATION_STATE_INITIALIZING = 1,
1023    #[doc = "The GPS receiver encountered an error while initializing signal authentication."]
1024    GPS_AUTHENTICATION_STATE_ERROR = 2,
1025    #[doc = "The GPS receiver has correctly authenticated all signals."]
1026    GPS_AUTHENTICATION_STATE_OK = 3,
1027    #[doc = "GPS signal authentication is disabled on the receiver."]
1028    GPS_AUTHENTICATION_STATE_DISABLED = 4,
1029}
1030impl GpsAuthenticationState {
1031    pub const DEFAULT: Self = Self::GPS_AUTHENTICATION_STATE_UNKNOWN;
1032}
1033impl Default for GpsAuthenticationState {
1034    fn default() -> Self {
1035        Self::DEFAULT
1036    }
1037}
1038#[cfg_attr(feature = "ts", derive(TS))]
1039#[cfg_attr(feature = "ts", ts(export))]
1040#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1041#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1042#[cfg_attr(feature = "serde", serde(tag = "type"))]
1043#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1044#[repr(u32)]
1045#[doc = "Type of GPS fix"]
1046pub enum GpsFixType {
1047    #[doc = "No GPS connected"]
1048    GPS_FIX_TYPE_NO_GPS = 0,
1049    #[doc = "No position information, GPS is connected"]
1050    GPS_FIX_TYPE_NO_FIX = 1,
1051    #[doc = "2D position"]
1052    GPS_FIX_TYPE_2D_FIX = 2,
1053    #[doc = "3D position"]
1054    GPS_FIX_TYPE_3D_FIX = 3,
1055    #[doc = "DGPS/SBAS aided 3D position"]
1056    GPS_FIX_TYPE_DGPS = 4,
1057    #[doc = "RTK float, 3D position"]
1058    GPS_FIX_TYPE_RTK_FLOAT = 5,
1059    #[doc = "RTK Fixed, 3D position"]
1060    GPS_FIX_TYPE_RTK_FIXED = 6,
1061    #[doc = "Static fixed, typically used for base stations"]
1062    GPS_FIX_TYPE_STATIC = 7,
1063    #[doc = "PPP, 3D position."]
1064    GPS_FIX_TYPE_PPP = 8,
1065}
1066impl GpsFixType {
1067    pub const DEFAULT: Self = Self::GPS_FIX_TYPE_NO_GPS;
1068}
1069impl Default for GpsFixType {
1070    fn default() -> Self {
1071        Self::DEFAULT
1072    }
1073}
1074bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] pub struct GpsInputIgnoreFlags : u16 { # [doc = "ignore altitude field"] const GPS_INPUT_IGNORE_FLAG_ALT = 1 ; # [doc = "ignore hdop field"] const GPS_INPUT_IGNORE_FLAG_HDOP = 2 ; # [doc = "ignore vdop field"] const GPS_INPUT_IGNORE_FLAG_VDOP = 4 ; # [doc = "ignore horizontal velocity field (vn and ve)"] const GPS_INPUT_IGNORE_FLAG_VEL_HORIZ = 8 ; # [doc = "ignore vertical velocity field (vd)"] const GPS_INPUT_IGNORE_FLAG_VEL_VERT = 16 ; # [doc = "ignore speed accuracy field"] const GPS_INPUT_IGNORE_FLAG_SPEED_ACCURACY = 32 ; # [doc = "ignore horizontal accuracy field"] const GPS_INPUT_IGNORE_FLAG_HORIZONTAL_ACCURACY = 64 ; # [doc = "ignore vertical accuracy field"] const GPS_INPUT_IGNORE_FLAG_VERTICAL_ACCURACY = 128 ; } }
1075impl GpsInputIgnoreFlags {
1076    pub const DEFAULT: Self = Self::GPS_INPUT_IGNORE_FLAG_ALT;
1077}
1078impl Default for GpsInputIgnoreFlags {
1079    fn default() -> Self {
1080        Self::DEFAULT
1081    }
1082}
1083#[cfg_attr(feature = "ts", derive(TS))]
1084#[cfg_attr(feature = "ts", ts(export))]
1085#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1086#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1087#[cfg_attr(feature = "serde", serde(tag = "type"))]
1088#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1089#[repr(u32)]
1090#[doc = "Signal jamming state in a GPS receiver."]
1091pub enum GpsJammingState {
1092    #[doc = "The GPS receiver does not provide GPS signal jamming info."]
1093    GPS_JAMMING_STATE_UNKNOWN = 0,
1094    #[doc = "The GPS receiver detected no signal jamming."]
1095    GPS_JAMMING_STATE_OK = 1,
1096    #[doc = "The GPS receiver detected and mitigated signal jamming."]
1097    GPS_JAMMING_STATE_MITIGATED = 2,
1098    #[doc = "The GPS receiver detected signal jamming."]
1099    GPS_JAMMING_STATE_DETECTED = 3,
1100}
1101impl GpsJammingState {
1102    pub const DEFAULT: Self = Self::GPS_JAMMING_STATE_UNKNOWN;
1103}
1104impl Default for GpsJammingState {
1105    fn default() -> Self {
1106        Self::DEFAULT
1107    }
1108}
1109#[cfg_attr(feature = "ts", derive(TS))]
1110#[cfg_attr(feature = "ts", ts(export))]
1111#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1112#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1113#[cfg_attr(feature = "serde", serde(tag = "type"))]
1114#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1115#[repr(u32)]
1116#[doc = "State of RAIM processing."]
1117pub enum GpsRaimState {
1118    #[doc = "RAIM capability is unknown."]
1119    GPS_RAIM_STATE_UNKNOWN = 0,
1120    #[doc = "RAIM is disabled."]
1121    GPS_RAIM_STATE_DISABLED = 1,
1122    #[doc = "RAIM integrity check was successful."]
1123    GPS_RAIM_STATE_OK = 2,
1124    #[doc = "RAIM integrity check failed."]
1125    GPS_RAIM_STATE_FAILED = 3,
1126}
1127impl GpsRaimState {
1128    pub const DEFAULT: Self = Self::GPS_RAIM_STATE_UNKNOWN;
1129}
1130impl Default for GpsRaimState {
1131    fn default() -> Self {
1132        Self::DEFAULT
1133    }
1134}
1135#[cfg_attr(feature = "ts", derive(TS))]
1136#[cfg_attr(feature = "ts", ts(export))]
1137#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1138#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1139#[cfg_attr(feature = "serde", serde(tag = "type"))]
1140#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1141#[repr(u32)]
1142#[doc = "Signal spoofing state in a GPS receiver."]
1143pub enum GpsSpoofingState {
1144    #[doc = "The GPS receiver does not provide GPS signal spoofing info."]
1145    GPS_SPOOFING_STATE_UNKNOWN = 0,
1146    #[doc = "The GPS receiver detected no signal spoofing."]
1147    GPS_SPOOFING_STATE_OK = 1,
1148    #[doc = "The GPS receiver detected and mitigated signal spoofing."]
1149    GPS_SPOOFING_STATE_MITIGATED = 2,
1150    #[doc = "The GPS receiver detected signal spoofing but still has a fix."]
1151    GPS_SPOOFING_STATE_DETECTED = 3,
1152}
1153impl GpsSpoofingState {
1154    pub const DEFAULT: Self = Self::GPS_SPOOFING_STATE_UNKNOWN;
1155}
1156impl Default for GpsSpoofingState {
1157    fn default() -> Self {
1158        Self::DEFAULT
1159    }
1160}
1161bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags indicating errors in a GPS receiver."] pub struct GpsSystemErrorFlags : u32 { # [doc = "There are problems with incoming correction streams."] const GPS_SYSTEM_ERROR_INCOMING_CORRECTIONS = 1 ; # [doc = "There are problems with the configuration."] const GPS_SYSTEM_ERROR_CONFIGURATION = 2 ; # [doc = "There are problems with the software on the GPS receiver."] const GPS_SYSTEM_ERROR_SOFTWARE = 4 ; # [doc = "There are problems with an antenna connected to the GPS receiver."] const GPS_SYSTEM_ERROR_ANTENNA = 8 ; # [doc = "There are problems handling all incoming events."] const GPS_SYSTEM_ERROR_EVENT_CONGESTION = 16 ; # [doc = "The GPS receiver CPU is overloaded."] const GPS_SYSTEM_ERROR_CPU_OVERLOAD = 32 ; # [doc = "The GPS receiver is experiencing output congestion."] const GPS_SYSTEM_ERROR_OUTPUT_CONGESTION = 64 ; } }
1162impl GpsSystemErrorFlags {
1163    pub const DEFAULT: Self = Self::GPS_SYSTEM_ERROR_INCOMING_CORRECTIONS;
1164}
1165impl Default for GpsSystemErrorFlags {
1166    fn default() -> Self {
1167        Self::DEFAULT
1168    }
1169}
1170#[cfg_attr(feature = "ts", derive(TS))]
1171#[cfg_attr(feature = "ts", ts(export))]
1172#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1173#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1174#[cfg_attr(feature = "serde", serde(tag = "type"))]
1175#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1176#[repr(u32)]
1177#[doc = "Gripper actions."]
1178pub enum GripperActions {
1179    #[doc = "Gripper release cargo."]
1180    GRIPPER_ACTION_RELEASE = 0,
1181    #[doc = "Gripper grab onto cargo."]
1182    GRIPPER_ACTION_GRAB = 1,
1183}
1184impl GripperActions {
1185    pub const DEFAULT: Self = Self::GRIPPER_ACTION_RELEASE;
1186}
1187impl Default for GripperActions {
1188    fn default() -> Self {
1189        Self::DEFAULT
1190    }
1191}
1192bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIGHRES_IMU message indicate which fields have updated since the last message"] pub struct HighresImuUpdatedFlags : u16 { # [doc = "The value in the xacc field has been updated"] const HIGHRES_IMU_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIGHRES_IMU_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated since"] const HIGHRES_IMU_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIGHRES_IMU_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIGHRES_IMU_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIGHRES_IMU_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIGHRES_IMU_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIGHRES_IMU_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIGHRES_IMU_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIGHRES_IMU_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIGHRES_IMU_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIGHRES_IMU_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIGHRES_IMU_UPDATED_TEMPERATURE = 4096 ; } }
1193impl HighresImuUpdatedFlags {
1194    pub const DEFAULT: Self = Self::HIGHRES_IMU_UPDATED_XACC;
1195}
1196impl Default for HighresImuUpdatedFlags {
1197    fn default() -> Self {
1198        Self::DEFAULT
1199    }
1200}
1201bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags used in HIL_ACTUATOR_CONTROLS message."] pub struct HilActuatorControlsFlags : u64 { # [doc = "Simulation is using lockstep"] const HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP = 1 ; } }
1202impl HilActuatorControlsFlags {
1203    pub const DEFAULT: Self = Self::HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP;
1204}
1205impl Default for HilActuatorControlsFlags {
1206    fn default() -> Self {
1207        Self::DEFAULT
1208    }
1209}
1210bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIL_SENSOR message indicate which fields have updated since the last message"] pub struct HilSensorUpdatedFlags : u32 { # [doc = "The value in the xacc field has been updated"] const HIL_SENSOR_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIL_SENSOR_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated"] const HIL_SENSOR_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIL_SENSOR_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIL_SENSOR_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIL_SENSOR_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIL_SENSOR_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIL_SENSOR_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIL_SENSOR_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIL_SENSOR_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIL_SENSOR_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIL_SENSOR_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIL_SENSOR_UPDATED_TEMPERATURE = 4096 ; # [doc = "Full reset of attitude/position/velocities/etc was performed in sim (Bit 31)."] const HIL_SENSOR_UPDATED_RESET = 2147483648 ; } }
1211impl HilSensorUpdatedFlags {
1212    pub const DEFAULT: Self = Self::HIL_SENSOR_UPDATED_XACC;
1213}
1214impl Default for HilSensorUpdatedFlags {
1215    fn default() -> Self {
1216        Self::DEFAULT
1217    }
1218}
1219bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report failure cases over the high latency telemetry."] pub struct HlFailureFlag : u16 { # [doc = "GPS failure."] const HL_FAILURE_FLAG_GPS = 1 ; # [doc = "Differential pressure sensor failure."] const HL_FAILURE_FLAG_DIFFERENTIAL_PRESSURE = 2 ; # [doc = "Absolute pressure sensor failure."] const HL_FAILURE_FLAG_ABSOLUTE_PRESSURE = 4 ; # [doc = "Accelerometer sensor failure."] const HL_FAILURE_FLAG_3D_ACCEL = 8 ; # [doc = "Gyroscope sensor failure."] const HL_FAILURE_FLAG_3D_GYRO = 16 ; # [doc = "Magnetometer sensor failure."] const HL_FAILURE_FLAG_3D_MAG = 32 ; # [doc = "Terrain subsystem failure."] const HL_FAILURE_FLAG_TERRAIN = 64 ; # [doc = "Battery failure/critical low battery."] const HL_FAILURE_FLAG_BATTERY = 128 ; # [doc = "RC receiver failure/no RC connection."] const HL_FAILURE_FLAG_RC_RECEIVER = 256 ; # [doc = "Offboard link failure."] const HL_FAILURE_FLAG_OFFBOARD_LINK = 512 ; # [doc = "Engine failure."] const HL_FAILURE_FLAG_ENGINE = 1024 ; # [doc = "Geofence violation."] const HL_FAILURE_FLAG_GEOFENCE = 2048 ; # [doc = "Estimator failure, for example measurement rejection or large variances."] const HL_FAILURE_FLAG_ESTIMATOR = 4096 ; # [doc = "Mission failure."] const HL_FAILURE_FLAG_MISSION = 8192 ; } }
1220impl HlFailureFlag {
1221    pub const DEFAULT: Self = Self::HL_FAILURE_FLAG_GPS;
1222}
1223impl Default for HlFailureFlag {
1224    fn default() -> Self {
1225        Self::DEFAULT
1226    }
1227}
1228bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Illuminator module error flags (bitmap, 0 means no error)"] pub struct IlluminatorErrorFlags : u32 { # [doc = "Illuminator thermal throttling error."] const ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING = 1 ; # [doc = "Illuminator over temperature shutdown error."] const ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN = 2 ; # [doc = "Illuminator thermistor failure."] const ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE = 4 ; } }
1229impl IlluminatorErrorFlags {
1230    pub const DEFAULT: Self = Self::ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING;
1231}
1232impl Default for IlluminatorErrorFlags {
1233    fn default() -> Self {
1234        Self::DEFAULT
1235    }
1236}
1237#[cfg_attr(feature = "ts", derive(TS))]
1238#[cfg_attr(feature = "ts", ts(export))]
1239#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1240#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1241#[cfg_attr(feature = "serde", serde(tag = "type"))]
1242#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1243#[repr(u32)]
1244#[doc = "Modes of illuminator"]
1245pub enum IlluminatorMode {
1246    #[doc = "Illuminator mode is not specified/unknown"]
1247    ILLUMINATOR_MODE_UNKNOWN = 0,
1248    #[doc = "Illuminator behavior is controlled by MAV_CMD_DO_ILLUMINATOR_CONFIGURE settings"]
1249    ILLUMINATOR_MODE_INTERNAL_CONTROL = 1,
1250    #[doc = "Illuminator behavior is controlled by external factors: e.g. an external hardware signal"]
1251    ILLUMINATOR_MODE_EXTERNAL_SYNC = 2,
1252}
1253impl IlluminatorMode {
1254    pub const DEFAULT: Self = Self::ILLUMINATOR_MODE_UNKNOWN;
1255}
1256impl Default for IlluminatorMode {
1257    fn default() -> Self {
1258        Self::DEFAULT
1259    }
1260}
1261#[cfg_attr(feature = "ts", derive(TS))]
1262#[cfg_attr(feature = "ts", ts(export))]
1263#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1264#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1265#[cfg_attr(feature = "serde", serde(tag = "type"))]
1266#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1267#[repr(u32)]
1268#[doc = "Type of landing target"]
1269pub enum LandingTargetType {
1270    #[doc = "Landing target signaled by light beacon (ex: IR-LOCK)"]
1271    LANDING_TARGET_TYPE_LIGHT_BEACON = 0,
1272    #[doc = "Landing target signaled by radio beacon (ex: ILS, NDB)"]
1273    LANDING_TARGET_TYPE_RADIO_BEACON = 1,
1274    #[doc = "Landing target represented by a fiducial marker (ex: ARTag)"]
1275    LANDING_TARGET_TYPE_VISION_FIDUCIAL = 2,
1276    #[doc = "Landing target represented by a pre-defined visual shape/feature (ex: X-marker, H-marker, square)"]
1277    LANDING_TARGET_TYPE_VISION_OTHER = 3,
1278}
1279impl LandingTargetType {
1280    pub const DEFAULT: Self = Self::LANDING_TARGET_TYPE_LIGHT_BEACON;
1281}
1282impl Default for LandingTargetType {
1283    fn default() -> Self {
1284        Self::DEFAULT
1285    }
1286}
1287#[cfg_attr(feature = "ts", derive(TS))]
1288#[cfg_attr(feature = "ts", ts(export))]
1289#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1290#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1291#[cfg_attr(feature = "serde", serde(tag = "type"))]
1292#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1293#[repr(u32)]
1294pub enum MagCalStatus {
1295    MAG_CAL_NOT_STARTED = 0,
1296    MAG_CAL_WAITING_TO_START = 1,
1297    MAG_CAL_RUNNING_STEP_ONE = 2,
1298    MAG_CAL_RUNNING_STEP_TWO = 3,
1299    MAG_CAL_SUCCESS = 4,
1300    MAG_CAL_FAILED = 5,
1301    MAG_CAL_BAD_ORIENTATION = 6,
1302    MAG_CAL_BAD_RADIUS = 7,
1303}
1304impl MagCalStatus {
1305    pub const DEFAULT: Self = Self::MAG_CAL_NOT_STARTED;
1306}
1307impl Default for MagCalStatus {
1308    fn default() -> Self {
1309        Self::DEFAULT
1310    }
1311}
1312#[cfg_attr(feature = "ts", derive(TS))]
1313#[cfg_attr(feature = "ts", ts(export))]
1314#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1315#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1316#[cfg_attr(feature = "serde", serde(tag = "type"))]
1317#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1318#[repr(u32)]
1319pub enum MavArmAuthDeniedReason {
1320    #[doc = "Not a specific reason"]
1321    MAV_ARM_AUTH_DENIED_REASON_GENERIC = 0,
1322    #[doc = "Authorizer will send the error as string to GCS"]
1323    MAV_ARM_AUTH_DENIED_REASON_NONE = 1,
1324    #[doc = "At least one waypoint have a invalid value"]
1325    MAV_ARM_AUTH_DENIED_REASON_INVALID_WAYPOINT = 2,
1326    #[doc = "Timeout in the authorizer process(in case it depends on network)"]
1327    MAV_ARM_AUTH_DENIED_REASON_TIMEOUT = 3,
1328    #[doc = "Airspace of the mission in use by another vehicle, second result parameter can have the waypoint id that caused it to be denied."]
1329    MAV_ARM_AUTH_DENIED_REASON_AIRSPACE_IN_USE = 4,
1330    #[doc = "Weather is not good to fly"]
1331    MAV_ARM_AUTH_DENIED_REASON_BAD_WEATHER = 5,
1332}
1333impl MavArmAuthDeniedReason {
1334    pub const DEFAULT: Self = Self::MAV_ARM_AUTH_DENIED_REASON_GENERIC;
1335}
1336impl Default for MavArmAuthDeniedReason {
1337    fn default() -> Self {
1338        Self::DEFAULT
1339    }
1340}
1341#[cfg_attr(feature = "ts", derive(TS))]
1342#[cfg_attr(feature = "ts", ts(export))]
1343#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1344#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1345#[cfg_attr(feature = "serde", serde(tag = "type"))]
1346#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1347#[repr(u32)]
1348#[doc = "Micro air vehicle / autopilot classes. This identifies the individual model."]
1349pub enum MavAutopilot {
1350    #[doc = "Generic autopilot, full support for everything"]
1351    MAV_AUTOPILOT_GENERIC = 0,
1352    #[doc = "Reserved for future use."]
1353    MAV_AUTOPILOT_RESERVED = 1,
1354    #[doc = "SLUGS autopilot, <http://slugsuav.soe.ucsc.edu>"]
1355    MAV_AUTOPILOT_SLUGS = 2,
1356    #[doc = "ArduPilot - Plane/Copter/Rover/Sub/Tracker, <https://ardupilot.org>"]
1357    MAV_AUTOPILOT_ARDUPILOTMEGA = 3,
1358    #[doc = "OpenPilot, <http://openpilot.org>"]
1359    MAV_AUTOPILOT_OPENPILOT = 4,
1360    #[doc = "Generic autopilot only supporting simple waypoints"]
1361    MAV_AUTOPILOT_GENERIC_WAYPOINTS_ONLY = 5,
1362    #[doc = "Generic autopilot supporting waypoints and other simple navigation commands"]
1363    MAV_AUTOPILOT_GENERIC_WAYPOINTS_AND_SIMPLE_NAVIGATION_ONLY = 6,
1364    #[doc = "Generic autopilot supporting the full mission command set"]
1365    MAV_AUTOPILOT_GENERIC_MISSION_FULL = 7,
1366    #[doc = "No valid autopilot, e.g. a GCS or other MAVLink component"]
1367    MAV_AUTOPILOT_INVALID = 8,
1368    #[doc = "PPZ UAV - <http://nongnu.org/paparazzi>"]
1369    MAV_AUTOPILOT_PPZ = 9,
1370    #[doc = "UAV Dev Board"]
1371    MAV_AUTOPILOT_UDB = 10,
1372    #[doc = "FlexiPilot"]
1373    MAV_AUTOPILOT_FP = 11,
1374    #[doc = "PX4 Autopilot - <http://px4.io/>"]
1375    MAV_AUTOPILOT_PX4 = 12,
1376    #[doc = "SMACCMPilot - <http://smaccmpilot.org>"]
1377    MAV_AUTOPILOT_SMACCMPILOT = 13,
1378    #[doc = "AutoQuad -- <http://autoquad.org>"]
1379    MAV_AUTOPILOT_AUTOQUAD = 14,
1380    #[doc = "Armazila -- <http://armazila.com>"]
1381    MAV_AUTOPILOT_ARMAZILA = 15,
1382    #[doc = "Aerob -- <http://aerob.ru>"]
1383    MAV_AUTOPILOT_AEROB = 16,
1384    #[doc = "ASLUAV autopilot -- <http://www.asl.ethz.ch>"]
1385    MAV_AUTOPILOT_ASLUAV = 17,
1386    #[doc = "SmartAP Autopilot - <http://sky-drones.com>"]
1387    MAV_AUTOPILOT_SMARTAP = 18,
1388    #[doc = "AirRails - <http://uaventure.com>"]
1389    MAV_AUTOPILOT_AIRRAILS = 19,
1390    #[doc = "Fusion Reflex - <https://fusion.engineering>"]
1391    MAV_AUTOPILOT_REFLEX = 20,
1392}
1393impl MavAutopilot {
1394    pub const DEFAULT: Self = Self::MAV_AUTOPILOT_GENERIC;
1395}
1396impl Default for MavAutopilot {
1397    fn default() -> Self {
1398        Self::DEFAULT
1399    }
1400}
1401#[cfg_attr(feature = "ts", derive(TS))]
1402#[cfg_attr(feature = "ts", ts(export))]
1403#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1404#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1405#[cfg_attr(feature = "serde", serde(tag = "type"))]
1406#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1407#[repr(u32)]
1408#[doc = "Enumeration for battery charge states."]
1409pub enum MavBatteryChargeState {
1410    #[doc = "Low battery state is not provided"]
1411    MAV_BATTERY_CHARGE_STATE_UNDEFINED = 0,
1412    #[doc = "Battery is not in low state. Normal operation."]
1413    MAV_BATTERY_CHARGE_STATE_OK = 1,
1414    #[doc = "Battery state is low, warn and monitor close."]
1415    MAV_BATTERY_CHARGE_STATE_LOW = 2,
1416    #[doc = "Battery state is critical, return or abort immediately."]
1417    MAV_BATTERY_CHARGE_STATE_CRITICAL = 3,
1418    #[doc = "Battery state is too low for ordinary abort sequence. Perform fastest possible emergency stop to prevent damage."]
1419    MAV_BATTERY_CHARGE_STATE_EMERGENCY = 4,
1420    #[doc = "Battery failed, damage unavoidable. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1421    MAV_BATTERY_CHARGE_STATE_FAILED = 5,
1422    #[doc = "Battery is diagnosed to be defective or an error occurred, usage is discouraged / prohibited. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1423    MAV_BATTERY_CHARGE_STATE_UNHEALTHY = 6,
1424    #[doc = "Battery is charging."]
1425    MAV_BATTERY_CHARGE_STATE_CHARGING = 7,
1426}
1427impl MavBatteryChargeState {
1428    pub const DEFAULT: Self = Self::MAV_BATTERY_CHARGE_STATE_UNDEFINED;
1429}
1430impl Default for MavBatteryChargeState {
1431    fn default() -> Self {
1432        Self::DEFAULT
1433    }
1434}
1435bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Smart battery supply status/fault flags (bitmask) for health indication. The battery must also report either MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY if any of these are set."] pub struct MavBatteryFault : u32 { # [doc = "Battery has deep discharged."] const MAV_BATTERY_FAULT_DEEP_DISCHARGE = 1 ; # [doc = "Voltage spikes."] const MAV_BATTERY_FAULT_SPIKES = 2 ; # [doc = "One or more cells have failed. Battery should also report MAV_BATTERY_CHARGE_STATE_FAILE (and should not be used)."] const MAV_BATTERY_FAULT_CELL_FAIL = 4 ; # [doc = "Over-current fault."] const MAV_BATTERY_FAULT_OVER_CURRENT = 8 ; # [doc = "Over-temperature fault."] const MAV_BATTERY_FAULT_OVER_TEMPERATURE = 16 ; # [doc = "Under-temperature fault."] const MAV_BATTERY_FAULT_UNDER_TEMPERATURE = 32 ; # [doc = "Vehicle voltage is not compatible with this battery (batteries on same power rail should have similar voltage)."] const MAV_BATTERY_FAULT_INCOMPATIBLE_VOLTAGE = 64 ; # [doc = "Battery firmware is not compatible with current autopilot firmware."] const MAV_BATTERY_FAULT_INCOMPATIBLE_FIRMWARE = 128 ; # [doc = "Battery is not compatible due to cell configuration (e.g. 5s1p when vehicle requires 6s)."] const BATTERY_FAULT_INCOMPATIBLE_CELLS_CONFIGURATION = 256 ; } }
1436impl MavBatteryFault {
1437    pub const DEFAULT: Self = Self::MAV_BATTERY_FAULT_DEEP_DISCHARGE;
1438}
1439impl Default for MavBatteryFault {
1440    fn default() -> Self {
1441        Self::DEFAULT
1442    }
1443}
1444#[cfg_attr(feature = "ts", derive(TS))]
1445#[cfg_attr(feature = "ts", ts(export))]
1446#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1447#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1448#[cfg_attr(feature = "serde", serde(tag = "type"))]
1449#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1450#[repr(u32)]
1451#[doc = "Enumeration of battery functions"]
1452pub enum MavBatteryFunction {
1453    #[doc = "Battery function is unknown"]
1454    MAV_BATTERY_FUNCTION_UNKNOWN = 0,
1455    #[doc = "Battery supports all flight systems"]
1456    MAV_BATTERY_FUNCTION_ALL = 1,
1457    #[doc = "Battery for the propulsion system"]
1458    MAV_BATTERY_FUNCTION_PROPULSION = 2,
1459    #[doc = "Avionics battery"]
1460    MAV_BATTERY_FUNCTION_AVIONICS = 3,
1461    #[doc = "Payload battery"]
1462    MAV_BATTERY_FUNCTION_PAYLOAD = 4,
1463}
1464impl MavBatteryFunction {
1465    pub const DEFAULT: Self = Self::MAV_BATTERY_FUNCTION_UNKNOWN;
1466}
1467impl Default for MavBatteryFunction {
1468    fn default() -> Self {
1469        Self::DEFAULT
1470    }
1471}
1472#[cfg_attr(feature = "ts", derive(TS))]
1473#[cfg_attr(feature = "ts", ts(export))]
1474#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1475#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1476#[cfg_attr(feature = "serde", serde(tag = "type"))]
1477#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1478#[repr(u32)]
1479#[doc = "Battery mode. Note, the normal operation mode (i.e. when flying) should be reported as MAV_BATTERY_MODE_UNKNOWN to allow message trimming in normal flight."]
1480pub enum MavBatteryMode {
1481    #[doc = "Battery mode not supported/unknown battery mode/normal operation."]
1482    MAV_BATTERY_MODE_UNKNOWN = 0,
1483    #[doc = "Battery is auto discharging (towards storage level)."]
1484    MAV_BATTERY_MODE_AUTO_DISCHARGING = 1,
1485    #[doc = "Battery in hot-swap mode (current limited to prevent spikes that might damage sensitive electrical circuits)."]
1486    MAV_BATTERY_MODE_HOT_SWAP = 2,
1487}
1488impl MavBatteryMode {
1489    pub const DEFAULT: Self = Self::MAV_BATTERY_MODE_UNKNOWN;
1490}
1491impl Default for MavBatteryMode {
1492    fn default() -> Self {
1493        Self::DEFAULT
1494    }
1495}
1496bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Battery status flags for fault, health and state indication."] pub struct MavBatteryStatusFlags : u32 { # [doc = "The battery is not ready to use (fly).           Set if the battery has faults or other conditions that make it unsafe to fly with.           Note: It will be the logical OR of other status bits (chosen by the manufacturer/integrator)."] const MAV_BATTERY_STATUS_FLAGS_NOT_READY_TO_USE = 1 ; # [doc = "Battery is charging."] const MAV_BATTERY_STATUS_FLAGS_CHARGING = 2 ; # [doc = "Battery is cell balancing (during charging).           Not ready to use (MAV_BATTERY_STATUS_FLAGS_NOT_READY_TO_USE may be set)."] const MAV_BATTERY_STATUS_FLAGS_CELL_BALANCING = 4 ; # [doc = "Battery cells are not balanced.           Not ready to use."] const MAV_BATTERY_STATUS_FLAGS_FAULT_CELL_IMBALANCE = 8 ; # [doc = "Battery is auto discharging (towards storage level).           Not ready to use (MAV_BATTERY_STATUS_FLAGS_NOT_READY_TO_USE would be set)."] const MAV_BATTERY_STATUS_FLAGS_AUTO_DISCHARGING = 16 ; # [doc = "Battery requires service (not safe to fly).           This is set at vendor discretion.           It is likely to be set for most faults, and may also be set according to a maintenance schedule (such as age, or number of recharge cycles, etc.)."] const MAV_BATTERY_STATUS_FLAGS_REQUIRES_SERVICE = 32 ; # [doc = "Battery is faulty and cannot be repaired (not safe to fly).           This is set at vendor discretion.           The battery should be disposed of safely."] const MAV_BATTERY_STATUS_FLAGS_BAD_BATTERY = 64 ; # [doc = "Automatic battery protection monitoring is enabled.           When enabled, the system will monitor for certain kinds of faults, such as cells being over-voltage.           If a fault is triggered then and protections are enabled then a safety fault (MAV_BATTERY_STATUS_FLAGS_FAULT_PROTECTION_SYSTEM) will be set and power from the battery will be stopped.           Note that battery protection monitoring should only be enabled when the vehicle is landed. Once the vehicle is armed, or starts moving, the protections should be disabled to prevent false positives from disabling the output."] const MAV_BATTERY_STATUS_FLAGS_PROTECTIONS_ENABLED = 128 ; # [doc = "The battery fault protection system had detected a fault and cut all power from the battery.           This will only trigger if MAV_BATTERY_STATUS_FLAGS_PROTECTIONS_ENABLED is set.           Other faults like MAV_BATTERY_STATUS_FLAGS_FAULT_OVER_VOLT may also be set, indicating the cause of the protection fault."] const MAV_BATTERY_STATUS_FLAGS_FAULT_PROTECTION_SYSTEM = 256 ; # [doc = "One or more cells are above their maximum voltage rating."] const MAV_BATTERY_STATUS_FLAGS_FAULT_OVER_VOLT = 512 ; # [doc = "One or more cells are below their minimum voltage rating.           A battery that had deep-discharged might be irrepairably damaged, and set both MAV_BATTERY_STATUS_FLAGS_FAULT_UNDER_VOLT and MAV_BATTERY_STATUS_FLAGS_BAD_BATTERY."] const MAV_BATTERY_STATUS_FLAGS_FAULT_UNDER_VOLT = 1024 ; # [doc = "Over-temperature fault."] const MAV_BATTERY_STATUS_FLAGS_FAULT_OVER_TEMPERATURE = 2048 ; # [doc = "Under-temperature fault."] const MAV_BATTERY_STATUS_FLAGS_FAULT_UNDER_TEMPERATURE = 4096 ; # [doc = "Over-current fault."] const MAV_BATTERY_STATUS_FLAGS_FAULT_OVER_CURRENT = 8192 ; # [doc = "Short circuit event detected.           The battery may or may not be safe to use (check other flags)."] const MAV_BATTERY_STATUS_FLAGS_FAULT_SHORT_CIRCUIT = 16384 ; # [doc = "Voltage not compatible with power rail voltage (batteries on same power rail should have similar voltage)."] const MAV_BATTERY_STATUS_FLAGS_FAULT_INCOMPATIBLE_VOLTAGE = 32768 ; # [doc = "Battery firmware is not compatible with current autopilot firmware."] const MAV_BATTERY_STATUS_FLAGS_FAULT_INCOMPATIBLE_FIRMWARE = 65536 ; # [doc = "Battery is not compatible due to cell configuration (e.g. 5s1p when vehicle requires 6s)."] const MAV_BATTERY_STATUS_FLAGS_FAULT_INCOMPATIBLE_CELLS_CONFIGURATION = 131072 ; # [doc = "Battery capacity_consumed and capacity_remaining values are relative to a full battery (they sum to the total capacity of the battery).           This flag would be set for a smart battery that can accurately determine its remaining charge across vehicle reboots and discharge/recharge cycles.           If unset the capacity_consumed indicates the consumption since vehicle power-on, as measured using a power monitor. The capacity_remaining, if provided, indicates the estimated remaining capacity on the assumption that the battery was full on vehicle boot.           If unset a GCS is recommended to advise that users fully charge the battery on power on."] const MAV_BATTERY_STATUS_FLAGS_CAPACITY_RELATIVE_TO_FULL = 262144 ; # [doc = "Reserved (not used). If set, this will indicate that an additional status field exists for higher status values."] const MAV_BATTERY_STATUS_FLAGS_EXTENDED = 2147483648 ; } }
1497impl MavBatteryStatusFlags {
1498    pub const DEFAULT: Self = Self::MAV_BATTERY_STATUS_FLAGS_NOT_READY_TO_USE;
1499}
1500impl Default for MavBatteryStatusFlags {
1501    fn default() -> Self {
1502        Self::DEFAULT
1503    }
1504}
1505#[cfg_attr(feature = "ts", derive(TS))]
1506#[cfg_attr(feature = "ts", ts(export))]
1507#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1508#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1509#[cfg_attr(feature = "serde", serde(tag = "type"))]
1510#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1511#[repr(u32)]
1512#[doc = "Enumeration of battery types"]
1513pub enum MavBatteryType {
1514    #[doc = "Not specified."]
1515    MAV_BATTERY_TYPE_UNKNOWN = 0,
1516    #[doc = "Lithium polymer battery"]
1517    MAV_BATTERY_TYPE_LIPO = 1,
1518    #[doc = "Lithium-iron-phosphate battery"]
1519    MAV_BATTERY_TYPE_LIFE = 2,
1520    #[doc = "Lithium-ION battery"]
1521    MAV_BATTERY_TYPE_LION = 3,
1522    #[doc = "Nickel metal hydride battery"]
1523    MAV_BATTERY_TYPE_NIMH = 4,
1524}
1525impl MavBatteryType {
1526    pub const DEFAULT: Self = Self::MAV_BATTERY_TYPE_UNKNOWN;
1527}
1528impl Default for MavBatteryType {
1529    fn default() -> Self {
1530        Self::DEFAULT
1531    }
1532}
1533#[cfg_attr(feature = "ts", derive(TS))]
1534#[cfg_attr(feature = "ts", ts(export))]
1535#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1536#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1537#[cfg_attr(feature = "serde", serde(tag = "type"))]
1538#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1539#[repr(u32)]
1540#[doc = "Commands to be executed by the MAV. They can be executed on user request, or as part of a mission script. If the action is used in a mission, the parameter mapping to the waypoint/mission message is as follows: Param 1, Param 2, Param 3, Param 4, X: Param 5, Y:Param 6, Z:Param 7. This command list is similar what ARINC 424 is for commercial aircraft: A data format how to interpret waypoint/mission data. NaN and INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current yaw or latitude rather than a specific value). See <https://mavlink.io/en/guide/xml_schema.html#MAV_CMD> for information about the structure of the MAV_CMD entries"]
1541pub enum MavCmd {
1542    #[doc = "Navigate to waypoint. This is intended for use in missions (for guided commands outside of missions use MAV_CMD_DO_REPOSITION)."]
1543    MAV_CMD_NAV_WAYPOINT = 16,
1544    #[doc = "Loiter around this waypoint an unlimited amount of time"]
1545    MAV_CMD_NAV_LOITER_UNLIM = 17,
1546    #[doc = "Loiter around this waypoint for X turns"]
1547    MAV_CMD_NAV_LOITER_TURNS = 18,
1548    #[doc = "Loiter at the specified latitude, longitude and altitude for a certain amount of time. Multicopter vehicles stop at the point (within a vehicle-specific acceptance radius). Forward-only moving vehicles (e.g. fixed-wing) circle the point with the specified radius/direction. If the Heading Required parameter (2) is non-zero forward moving aircraft will only leave the loiter circle once heading towards the next waypoint."]
1549    MAV_CMD_NAV_LOITER_TIME = 19,
1550    #[doc = "Return to launch location"]
1551    MAV_CMD_NAV_RETURN_TO_LAUNCH = 20,
1552    #[doc = "Land at location."]
1553    MAV_CMD_NAV_LAND = 21,
1554    #[doc = "Takeoff from ground / hand. Vehicles that support multiple takeoff modes (e.g. VTOL quadplane) should take off using the currently configured mode."]
1555    MAV_CMD_NAV_TAKEOFF = 22,
1556    #[doc = "Land at local position (local frame only)"]
1557    MAV_CMD_NAV_LAND_LOCAL = 23,
1558    #[doc = "Takeoff from local position (local frame only)"]
1559    MAV_CMD_NAV_TAKEOFF_LOCAL = 24,
1560    #[doc = "Vehicle following, i.e. this waypoint represents the position of a moving vehicle"]
1561    MAV_CMD_NAV_FOLLOW = 25,
1562    #[doc = "Continue on the current course and climb/descend to specified altitude.  When the altitude is reached continue to the next command (i.e., don't proceed to the next command until the desired altitude is reached."]
1563    MAV_CMD_NAV_CONTINUE_AND_CHANGE_ALT = 30,
1564    #[doc = "Begin loiter at the specified Latitude and Longitude.  If Lat=Lon=0, then loiter at the current position.  Don't consider the navigation command complete (don't leave loiter) until the altitude has been reached. Additionally, if the Heading Required parameter is non-zero the aircraft will not leave the loiter until heading toward the next waypoint."]
1565    MAV_CMD_NAV_LOITER_TO_ALT = 31,
1566    #[doc = "Begin following a target"]
1567    MAV_CMD_DO_FOLLOW = 32,
1568    #[doc = "Reposition the MAV after a follow target command has been sent"]
1569    MAV_CMD_DO_FOLLOW_REPOSITION = 33,
1570    #[doc = "Start orbiting on the circumference of a circle defined by the parameters. Setting values to NaN/INT32_MAX (as appropriate) results in using defaults."]
1571    MAV_CMD_DO_ORBIT = 34,
1572    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1573    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1574    MAV_CMD_NAV_ROI = 80,
1575    #[doc = "Control autonomous path planning on the MAV."]
1576    MAV_CMD_NAV_PATHPLANNING = 81,
1577    #[doc = "Navigate to waypoint using a spline path."]
1578    MAV_CMD_NAV_SPLINE_WAYPOINT = 82,
1579    #[doc = "Takeoff from ground using VTOL mode, and transition to forward flight with specified heading. The command should be ignored by vehicles that dont support both VTOL and fixed-wing flight (multicopters, boats,etc.)."]
1580    MAV_CMD_NAV_VTOL_TAKEOFF = 84,
1581    #[doc = "Land using VTOL mode"]
1582    MAV_CMD_NAV_VTOL_LAND = 85,
1583    #[doc = "hand control over to an external controller"]
1584    MAV_CMD_NAV_GUIDED_ENABLE = 92,
1585    #[doc = "Delay the next navigation command a number of seconds or until a specified time"]
1586    MAV_CMD_NAV_DELAY = 93,
1587    #[doc = "Descend and place payload. Vehicle moves to specified location, descends until it detects a hanging payload has reached the ground, and then releases the payload. If ground is not detected before the reaching the maximum descent value (param1), the command will complete without releasing the payload."]
1588    MAV_CMD_NAV_PAYLOAD_PLACE = 94,
1589    #[doc = "NOP - This command is only used to mark the upper limit of the NAV/ACTION commands in the enumeration"]
1590    MAV_CMD_NAV_LAST = 95,
1591    #[doc = "Delay mission state machine."]
1592    MAV_CMD_CONDITION_DELAY = 112,
1593    #[doc = "Ascend/descend to target altitude at specified rate. Delay mission state machine until desired altitude reached."]
1594    MAV_CMD_CONDITION_CHANGE_ALT = 113,
1595    #[doc = "Delay mission state machine until within desired distance of next NAV point."]
1596    MAV_CMD_CONDITION_DISTANCE = 114,
1597    #[doc = "Reach a certain target angle."]
1598    MAV_CMD_CONDITION_YAW = 115,
1599    #[doc = "NOP - This command is only used to mark the upper limit of the CONDITION commands in the enumeration"]
1600    MAV_CMD_CONDITION_LAST = 159,
1601    #[doc = "Set system mode."]
1602    MAV_CMD_DO_SET_MODE = 176,
1603    #[doc = "Jump to the desired command in the mission list.  Repeat this action only the specified number of times"]
1604    MAV_CMD_DO_JUMP = 177,
1605    #[doc = "Change speed and/or throttle set points. The value persists until it is overridden or there is a mode change"]
1606    MAV_CMD_DO_CHANGE_SPEED = 178,
1607    #[doc = "Sets the home position to either to the current position or a specified position.           The home position is the default position that the system will return to and land on.           The position is set automatically by the system during the takeoff (and may also be set using this command).           Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
1608    MAV_CMD_DO_SET_HOME = 179,
1609    #[deprecated = " See `PARAM_SET` (Deprecated since 2024-04)"]
1610    #[doc = "Set a system parameter.  Caution!  Use of this command requires knowledge of the numeric enumeration value of the parameter."]
1611    MAV_CMD_DO_SET_PARAMETER = 180,
1612    #[doc = "Set a relay to a condition."]
1613    MAV_CMD_DO_SET_RELAY = 181,
1614    #[doc = "Cycle a relay on and off for a desired number of cycles with a desired period."]
1615    MAV_CMD_DO_REPEAT_RELAY = 182,
1616    #[doc = "Set a servo to a desired PWM value."]
1617    MAV_CMD_DO_SET_SERVO = 183,
1618    #[doc = "Cycle a between its nominal setting and a desired PWM for a desired number of cycles with a desired period."]
1619    MAV_CMD_DO_REPEAT_SERVO = 184,
1620    #[doc = "0.5); the ACK should be either MAV_RESULT_FAILED or MAV_RESULT_UNSUPPORTED."]
1621    MAV_CMD_DO_FLIGHTTERMINATION = 185,
1622    #[doc = "Change altitude set point."]
1623    MAV_CMD_DO_CHANGE_ALTITUDE = 186,
1624    #[doc = "Sets actuators (e.g. servos) to a desired value. The actuator numbers are mapped to specific outputs (e.g. on any MAIN or AUX PWM or UAVCAN) using a flight-stack specific mechanism (i.e. a parameter)."]
1625    MAV_CMD_DO_SET_ACTUATOR = 187,
1626    #[doc = "Mission item to specify the start of a failsafe/landing return-path segment (the end of the segment is the next MAV_CMD_DO_LAND_START item).           A vehicle that is using missions for landing (e.g. in a return mode) will join the mission on the closest path of the return-path segment (instead of MAV_CMD_DO_LAND_START or the nearest waypoint).           The main use case is to minimize the failsafe flight path in corridor missions, where the inbound/outbound paths are constrained (by geofences) to the same particular path.           The MAV_CMD_NAV_RETURN_PATH_START would be placed at the start of the return path.           If a failsafe occurs on the outbound path the vehicle will move to the nearest point on the return path (which is parallel for this kind of mission), effectively turning round and following the shortest path to landing.           If a failsafe occurs on the inbound path the vehicle is already on the return segment and will continue to landing.           The Latitude/Longitude/Altitude are optional, and may be set to 0 if not needed.           If specified, the item defines the waypoint at which the return segment starts.           If sent using as a command, the vehicle will perform a mission landing (using the land segment if defined) or reject the command if mission landings are not supported, or no mission landing is defined. When used as a command any position information in the command is ignored."]
1627    MAV_CMD_DO_RETURN_PATH_START = 188,
1628    #[doc = "Mission item to mark the start of a mission landing pattern, or a command to land with a mission landing pattern.          When used in a mission, this is a marker for the start of a sequence of mission items that represent a landing pattern.         It should be followed by a navigation item that defines the first waypoint of the landing sequence.         The start marker positional params are used only for selecting what landing pattern to use if several are defined in the mission (the selected pattern will be the one with the marker position that is closest to the vehicle when a landing is commanded).         If the marker item position has zero-values for latitude, longitude, and altitude, then landing pattern selection is instead based on the position of the first waypoint in the landing sequence.  \t      When sent as a command it triggers a landing using a mission landing pattern. \t      The location parameters are not used in this case, and should be set to 0."]
1629    MAV_CMD_DO_LAND_START = 189,
1630    #[doc = "Mission command to perform a landing from a rally point."]
1631    MAV_CMD_DO_RALLY_LAND = 190,
1632    #[doc = "Mission command to safely abort an autonomous landing."]
1633    MAV_CMD_DO_GO_AROUND = 191,
1634    #[doc = "Reposition the vehicle to a specific WGS84 global position. This command is intended for guided commands (for missions use MAV_CMD_NAV_WAYPOINT instead)."]
1635    MAV_CMD_DO_REPOSITION = 192,
1636    #[doc = "If in a GPS controlled position mode, hold the current position or continue."]
1637    MAV_CMD_DO_PAUSE_CONTINUE = 193,
1638    #[doc = "Set moving direction to forward or reverse."]
1639    MAV_CMD_DO_SET_REVERSE = 194,
1640    #[doc = "Sets the region of interest (ROI) to a location. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal is not to react to this message."]
1641    MAV_CMD_DO_SET_ROI_LOCATION = 195,
1642    #[doc = "Sets the region of interest (ROI) to be toward next waypoint, with optional pitch/roll/yaw offset. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
1643    MAV_CMD_DO_SET_ROI_WPNEXT_OFFSET = 196,
1644    #[doc = "Cancels any previous ROI command returning the vehicle/sensors to default flight characteristics. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message. After this command the gimbal manager should go back to manual input if available, and otherwise assume a neutral position."]
1645    MAV_CMD_DO_SET_ROI_NONE = 197,
1646    #[doc = "Mount tracks system with specified system ID. Determination of target vehicle position may be done with GLOBAL_POSITION_INT or any other means. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
1647    MAV_CMD_DO_SET_ROI_SYSID = 198,
1648    #[doc = "Control onboard camera system."]
1649    MAV_CMD_DO_CONTROL_VIDEO = 200,
1650    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1651    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1652    MAV_CMD_DO_SET_ROI = 201,
1653    #[doc = "Configure digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
1654    MAV_CMD_DO_DIGICAM_CONFIGURE = 202,
1655    #[doc = "Control digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
1656    MAV_CMD_DO_DIGICAM_CONTROL = 203,
1657    #[deprecated = "This message has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE` (Deprecated since 2020-01)"]
1658    #[doc = "Mission command to configure a camera or antenna mount"]
1659    MAV_CMD_DO_MOUNT_CONFIGURE = 204,
1660    #[deprecated = "This message is ambiguous and inconsistent. It has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW and `MAV_CMD_DO_SET_ROI_*` variants. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
1661    #[doc = "Mission command to control a camera or antenna mount"]
1662    MAV_CMD_DO_MOUNT_CONTROL = 205,
1663    #[doc = "Mission command to set camera trigger distance for this flight. The camera is triggered each time this distance is exceeded. This command can also be used to set the shutter integration time for the camera."]
1664    MAV_CMD_DO_SET_CAM_TRIGG_DIST = 206,
1665    #[doc = "Enable the geofence.           This can be used in a mission or via the command protocol.           The persistence/lifetime of the setting is undefined.           Depending on flight stack implementation it may persist until superseded, or it may revert to a system default at the end of a mission.           Flight stacks typically reset the setting to system defaults on reboot."]
1666    MAV_CMD_DO_FENCE_ENABLE = 207,
1667    #[doc = "Mission item/command to release a parachute or enable/disable auto release."]
1668    MAV_CMD_DO_PARACHUTE = 208,
1669    #[doc = "Command to perform motor test."]
1670    MAV_CMD_DO_MOTOR_TEST = 209,
1671    #[doc = "Change to/from inverted flight."]
1672    MAV_CMD_DO_INVERTED_FLIGHT = 210,
1673    #[doc = "Mission command to operate a gripper."]
1674    MAV_CMD_DO_GRIPPER = 211,
1675    #[doc = "Enable/disable autotune."]
1676    MAV_CMD_DO_AUTOTUNE_ENABLE = 212,
1677    #[doc = "Sets a desired vehicle turn angle and speed change."]
1678    MAV_CMD_NAV_SET_YAW_SPEED = 213,
1679    #[doc = "Mission command to set camera trigger interval for this flight. If triggering is enabled, the camera is triggered each time this interval expires. This command can also be used to set the shutter integration time for the camera."]
1680    MAV_CMD_DO_SET_CAM_TRIGG_INTERVAL = 214,
1681    #[deprecated = " See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
1682    #[doc = "Mission command to control a camera or antenna mount, using a quaternion as reference."]
1683    MAV_CMD_DO_MOUNT_CONTROL_QUAT = 220,
1684    #[doc = "set id of master controller"]
1685    MAV_CMD_DO_GUIDED_MASTER = 221,
1686    #[doc = "Set limits for external control"]
1687    MAV_CMD_DO_GUIDED_LIMITS = 222,
1688    #[doc = "Control vehicle engine. This is interpreted by the vehicles engine controller to change the target engine state. It is intended for vehicles with internal combustion engines"]
1689    MAV_CMD_DO_ENGINE_CONTROL = 223,
1690    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).           If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items. \t  Note that mission jump repeat counters are not reset unless param2 is set (see MAV_CMD_DO_JUMP param2).            This command may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.           If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.           If the system is not in mission mode this command must not trigger a switch to mission mode.            The mission may be \"reset\" using param2.           Resetting sets jump counters to initial values (to reset counters without changing the current mission item set the param1 to `-1`).           Resetting also explicitly changes a mission state of MISSION_STATE_COMPLETE to MISSION_STATE_PAUSED or MISSION_STATE_ACTIVE, potentially allowing it to resume when it is (next) in a mission mode.  \t  The command will ACK with MAV_RESULT_FAILED if the sequence number is out of range (including if there is no mission item)."]
1691    MAV_CMD_DO_SET_MISSION_CURRENT = 224,
1692    #[doc = "NOP - This command is only used to mark the upper limit of the DO commands in the enumeration"]
1693    MAV_CMD_DO_LAST = 240,
1694    #[doc = "Trigger calibration. This command will be only accepted if in pre-flight mode. Except for Temperature Calibration, only one sensor should be set in a single message and all others should be zero."]
1695    MAV_CMD_PREFLIGHT_CALIBRATION = 241,
1696    #[doc = "Set sensor offsets. This command will be only accepted if in pre-flight mode."]
1697    MAV_CMD_PREFLIGHT_SET_SENSOR_OFFSETS = 242,
1698    #[doc = "Trigger UAVCAN configuration (actuator ID assignment and direction mapping). Note that this maps to the legacy UAVCAN v0 function UAVCAN_ENUMERATE, which is intended to be executed just once during initial vehicle configuration (it is not a normal pre-flight command and has been poorly named)."]
1699    MAV_CMD_PREFLIGHT_UAVCAN = 243,
1700    #[doc = "Request storage of different parameter values and logs. This command will be only accepted if in pre-flight mode."]
1701    MAV_CMD_PREFLIGHT_STORAGE = 245,
1702    #[doc = "Request the reboot or shutdown of system components."]
1703    MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN = 246,
1704    #[doc = "Override current mission with command to pause mission, pause mission and move to position, continue/resume mission. When param 1 indicates that the mission is paused (MAV_GOTO_DO_HOLD), param 2 defines whether it holds in place or moves to another position."]
1705    MAV_CMD_OVERRIDE_GOTO = 252,
1706    #[doc = "Mission command to set a Camera Auto Mount Pivoting Oblique Survey (Replaces CAM_TRIGG_DIST for this purpose). The camera is triggered each time this distance is exceeded, then the mount moves to the next position. Params 4~6 set-up the angle limits and number of positions for oblique survey, where mount-enabled vehicles automatically roll the camera between shots to emulate an oblique camera setup (providing an increased HFOV). This command can also be used to set the shutter integration time for the camera."]
1707    MAV_CMD_OBLIQUE_SURVEY = 260,
1708    #[doc = "Enable the specified standard MAVLink mode.           If the specified mode is not supported, the vehicle should ACK with MAV_RESULT_FAILED.           See <https://mavlink.io/en/services/standard_modes.html>"]
1709    MAV_CMD_DO_SET_STANDARD_MODE = 262,
1710    #[doc = "start running a mission"]
1711    MAV_CMD_MISSION_START = 300,
1712    #[doc = "Actuator testing command. This is similar to MAV_CMD_DO_MOTOR_TEST but operates on the level of output functions, i.e. it is possible to test Motor1 independent from which output it is configured on. Autopilots must NACK this command with MAV_RESULT_TEMPORARILY_REJECTED while armed."]
1713    MAV_CMD_ACTUATOR_TEST = 310,
1714    #[doc = "Actuator configuration command."]
1715    MAV_CMD_CONFIGURE_ACTUATOR = 311,
1716    #[doc = "Arms / Disarms a component"]
1717    MAV_CMD_COMPONENT_ARM_DISARM = 400,
1718    #[doc = "Instructs a target system to run pre-arm checks.           This allows preflight checks to be run on demand, which may be useful on systems that normally run them at low rate, or which do not trigger checks when the armable state might have changed.           This command should return MAV_RESULT_ACCEPTED if it will run the checks.           The results of the checks are usually then reported in SYS_STATUS messages (this is system-specific).           The command should return MAV_RESULT_TEMPORARILY_REJECTED if the system is already armed."]
1719    MAV_CMD_RUN_PREARM_CHECKS = 401,
1720    #[doc = "Turns illuminators ON/OFF. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
1721    MAV_CMD_ILLUMINATOR_ON_OFF = 405,
1722    #[doc = "Configures illuminator settings. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
1723    MAV_CMD_DO_ILLUMINATOR_CONFIGURE = 406,
1724    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
1725    #[doc = "Request the home position from the vehicle. \t  The vehicle will ACK the command and then emit the HOME_POSITION message."]
1726    MAV_CMD_GET_HOME_POSITION = 410,
1727    #[doc = "Inject artificial failure for testing purposes. Note that autopilots should implement an additional protection before accepting this command such as a specific param setting."]
1728    MAV_CMD_INJECT_FAILURE = 420,
1729    #[doc = "Starts receiver pairing."]
1730    MAV_CMD_START_RX_PAIR = 500,
1731    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
1732    #[doc = "Request the interval between messages for a particular MAVLink message ID.           The receiver should ACK the command and then emit its response in a MESSAGE_INTERVAL message."]
1733    MAV_CMD_GET_MESSAGE_INTERVAL = 510,
1734    #[doc = "Set the interval between messages for a particular MAVLink message ID. This interface replaces REQUEST_DATA_STREAM."]
1735    MAV_CMD_SET_MESSAGE_INTERVAL = 511,
1736    #[doc = "Request the target system(s) emit a single instance of a specified message (i.e. a \"one-shot\" version of MAV_CMD_SET_MESSAGE_INTERVAL)."]
1737    MAV_CMD_REQUEST_MESSAGE = 512,
1738    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1739    #[doc = "Request MAVLink protocol version compatibility. All receivers should ACK the command and then emit their capabilities in an PROTOCOL_VERSION message"]
1740    MAV_CMD_REQUEST_PROTOCOL_VERSION = 519,
1741    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1742    #[doc = "Request autopilot capabilities. The receiver should ACK the command and then emit its capabilities in an AUTOPILOT_VERSION message"]
1743    MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES = 520,
1744    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1745    #[doc = "Request camera information (CAMERA_INFORMATION)."]
1746    MAV_CMD_REQUEST_CAMERA_INFORMATION = 521,
1747    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1748    #[doc = "Request camera settings (CAMERA_SETTINGS)."]
1749    MAV_CMD_REQUEST_CAMERA_SETTINGS = 522,
1750    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1751    #[doc = "Request storage information (STORAGE_INFORMATION). Use the command's target_component to target a specific component's storage."]
1752    MAV_CMD_REQUEST_STORAGE_INFORMATION = 525,
1753    #[doc = "Format a storage medium. Once format is complete, a STORAGE_INFORMATION message is sent. Use the command's target_component to target a specific component's storage."]
1754    MAV_CMD_STORAGE_FORMAT = 526,
1755    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1756    #[doc = "Request camera capture status (CAMERA_CAPTURE_STATUS)"]
1757    MAV_CMD_REQUEST_CAMERA_CAPTURE_STATUS = 527,
1758    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1759    #[doc = "Request flight information (FLIGHT_INFORMATION)"]
1760    MAV_CMD_REQUEST_FLIGHT_INFORMATION = 528,
1761    #[doc = "Reset all camera settings to Factory Default"]
1762    MAV_CMD_RESET_CAMERA_SETTINGS = 529,
1763    #[doc = "Set camera running mode. Use NaN for reserved values. GCS will send a MAV_CMD_REQUEST_VIDEO_STREAM_STATUS command after a mode change if the camera supports video streaming."]
1764    MAV_CMD_SET_CAMERA_MODE = 530,
1765    #[doc = "Set camera zoom. Camera must respond with a CAMERA_SETTINGS message (on success)."]
1766    MAV_CMD_SET_CAMERA_ZOOM = 531,
1767    #[doc = "Set camera focus. Camera must respond with a CAMERA_SETTINGS message (on success)."]
1768    MAV_CMD_SET_CAMERA_FOCUS = 532,
1769    #[doc = "Set that a particular storage is the preferred location for saving photos, videos, and/or other media (e.g. to set that an SD card is used for storing videos).           There can only be one preferred save location for each particular media type: setting a media usage flag will clear/reset that same flag if set on any other storage.           If no flag is set the system should use its default storage.           A target system can choose to always use default storage, in which case it should ACK the command with MAV_RESULT_UNSUPPORTED.           A target system can choose to not allow a particular storage to be set as preferred storage, in which case it should ACK the command with MAV_RESULT_DENIED."]
1770    MAV_CMD_SET_STORAGE_USAGE = 533,
1771    #[doc = "Set camera source. Changes the camera's active sources on cameras with multiple image sensors."]
1772    MAV_CMD_SET_CAMERA_SOURCE = 534,
1773    #[doc = "Tagged jump target. Can be jumped to with MAV_CMD_DO_JUMP_TAG."]
1774    MAV_CMD_JUMP_TAG = 600,
1775    #[doc = "Jump to the matching tag in the mission list. Repeat this action for the specified number of times. A mission should contain a single matching tag for each jump. If this is not the case then a jump to a missing tag should complete the mission, and a jump where there are multiple matching tags should always select the one with the lowest mission sequence number."]
1776    MAV_CMD_DO_JUMP_TAG = 601,
1777    #[doc = "Set gimbal manager pitch/yaw setpoints (low rate command). It is possible to set combinations of the values below. E.g. an angle as well as a desired angular rate can be used to get to this angle at a certain angular rate, or an angular rate only will result in continuous turning. NaN is to be used to signal unset. Note: only the gimbal manager will react to this command - it will be ignored by a gimbal device. Use GIMBAL_MANAGER_SET_PITCHYAW if you need to stream pitch/yaw setpoints at higher rate."]
1778    MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW = 1000,
1779    #[doc = "Gimbal configuration to set which sysid/compid is in primary and secondary control."]
1780    MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE = 1001,
1781    #[doc = "Start image capture sequence. CAMERA_IMAGE_CAPTURED must be emitted after each capture.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param 1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
1782    MAV_CMD_IMAGE_START_CAPTURE = 2000,
1783    #[doc = "Stop image capture sequence.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
1784    MAV_CMD_IMAGE_STOP_CAPTURE = 2001,
1785    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1786    #[doc = "Re-request a CAMERA_IMAGE_CAPTURED message."]
1787    MAV_CMD_REQUEST_CAMERA_IMAGE_CAPTURE = 2002,
1788    #[doc = "Enable or disable on-board camera triggering system."]
1789    MAV_CMD_DO_TRIGGER_CONTROL = 2003,
1790    #[doc = "If the camera supports point visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_POINT is set), this command allows to initiate the tracking."]
1791    MAV_CMD_CAMERA_TRACK_POINT = 2004,
1792    #[doc = "If the camera supports rectangle visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE is set), this command allows to initiate the tracking."]
1793    MAV_CMD_CAMERA_TRACK_RECTANGLE = 2005,
1794    #[doc = "Stops ongoing tracking."]
1795    MAV_CMD_CAMERA_STOP_TRACKING = 2010,
1796    #[doc = "Starts video capture (recording)."]
1797    MAV_CMD_VIDEO_START_CAPTURE = 2500,
1798    #[doc = "Stop the current video capture (recording)."]
1799    MAV_CMD_VIDEO_STOP_CAPTURE = 2501,
1800    #[doc = "Start video streaming"]
1801    MAV_CMD_VIDEO_START_STREAMING = 2502,
1802    #[doc = "Stop the given video stream"]
1803    MAV_CMD_VIDEO_STOP_STREAMING = 2503,
1804    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1805    #[doc = "Request video stream information (VIDEO_STREAM_INFORMATION)"]
1806    MAV_CMD_REQUEST_VIDEO_STREAM_INFORMATION = 2504,
1807    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1808    #[doc = "Request video stream status (VIDEO_STREAM_STATUS)"]
1809    MAV_CMD_REQUEST_VIDEO_STREAM_STATUS = 2505,
1810    #[doc = "Request to start streaming logging data over MAVLink (see also LOGGING_DATA message)"]
1811    MAV_CMD_LOGGING_START = 2510,
1812    #[doc = "Request to stop streaming log data over MAVLink"]
1813    MAV_CMD_LOGGING_STOP = 2511,
1814    MAV_CMD_AIRFRAME_CONFIGURATION = 2520,
1815    #[doc = "Request to start/stop transmitting over the high latency telemetry"]
1816    MAV_CMD_CONTROL_HIGH_LATENCY = 2600,
1817    #[doc = "Create a panorama at the current position"]
1818    MAV_CMD_PANORAMA_CREATE = 2800,
1819    #[doc = "Request VTOL transition"]
1820    MAV_CMD_DO_VTOL_TRANSITION = 3000,
1821    #[doc = "Request authorization to arm the vehicle to a external entity, the arm authorizer is responsible to request all data that is needs from the vehicle before authorize or deny the request. \t\tIf approved the COMMAND_ACK message progress field should be set with period of time that this authorization is valid in seconds. \t\tIf the authorization is denied COMMAND_ACK.result_param2 should be set with one of the reasons in ARM_AUTH_DENIED_REASON."]
1822    MAV_CMD_ARM_AUTHORIZATION_REQUEST = 3001,
1823    #[doc = "This command sets the submode to standard guided when vehicle is in guided mode. The vehicle holds position and altitude and the user can input the desired velocities along all three axes."]
1824    MAV_CMD_SET_GUIDED_SUBMODE_STANDARD = 4000,
1825    #[doc = "This command sets submode circle when vehicle is in guided mode. Vehicle flies along a circle facing the center of the circle. The user can input the velocity along the circle and change the radius. If no input is given the vehicle will hold position."]
1826    MAV_CMD_SET_GUIDED_SUBMODE_CIRCLE = 4001,
1827    #[doc = "Delay mission state machine until gate has been reached."]
1828    MAV_CMD_CONDITION_GATE = 4501,
1829    #[doc = "Fence return point (there can only be one such point in a geofence definition). If rally points are supported they should be used instead."]
1830    MAV_CMD_NAV_FENCE_RETURN_POINT = 5000,
1831    #[doc = "Fence vertex for an inclusion polygon (the polygon must not be self-intersecting). The vehicle must stay within this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
1832    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_INCLUSION = 5001,
1833    #[doc = "Fence vertex for an exclusion polygon (the polygon must not be self-intersecting). The vehicle must stay outside this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
1834    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_EXCLUSION = 5002,
1835    #[doc = "Circular fence area. The vehicle must stay inside this area."]
1836    MAV_CMD_NAV_FENCE_CIRCLE_INCLUSION = 5003,
1837    #[doc = "Circular fence area. The vehicle must stay outside this area."]
1838    MAV_CMD_NAV_FENCE_CIRCLE_EXCLUSION = 5004,
1839    #[doc = "Rally point. You can have multiple rally points defined."]
1840    MAV_CMD_NAV_RALLY_POINT = 5100,
1841    #[doc = "Commands the vehicle to respond with a sequence of messages UAVCAN_NODE_INFO, one message per every UAVCAN node that is online. Note that some of the response messages can be lost, which the receiver can detect easily by checking whether every received UAVCAN_NODE_STATUS has a matching message UAVCAN_NODE_INFO received earlier; if not, this command should be sent again in order to request re-transmission of the node information messages."]
1842    MAV_CMD_UAVCAN_GET_NODE_INFO = 5200,
1843    #[doc = "Change state of safety switch."]
1844    MAV_CMD_DO_SET_SAFETY_SWITCH_STATE = 5300,
1845    #[doc = "Trigger the start of an ADSB-out IDENT. This should only be used when requested to do so by an Air Traffic Controller in controlled airspace. This starts the IDENT which is then typically held for 18 seconds by the hardware per the Mode A, C, and S transponder spec."]
1846    MAV_CMD_DO_ADSB_OUT_IDENT = 10001,
1847    #[deprecated = "  (Deprecated since 2021-06)"]
1848    #[doc = "Deploy payload on a Lat / Lon / Alt position. This includes the navigation to reach the required release position and velocity."]
1849    MAV_CMD_PAYLOAD_PREPARE_DEPLOY = 30001,
1850    #[deprecated = "  (Deprecated since 2021-06)"]
1851    #[doc = "Control the payload deployment."]
1852    MAV_CMD_PAYLOAD_CONTROL_DEPLOY = 30002,
1853    #[doc = "Magnetometer calibration based on provided known yaw. This allows for fast calibration using WMM field tables in the vehicle, given only the known yaw of the vehicle. If Latitude and longitude are both zero then use the current vehicle location."]
1854    MAV_CMD_FIXED_MAG_CAL_YAW = 42006,
1855    #[doc = "Command to operate winch."]
1856    MAV_CMD_DO_WINCH = 42600,
1857    #[doc = "Provide an external position estimate for use when dead-reckoning. This is meant to be used for occasional position resets that may be provided by a external system such as a remote pilot using landmarks over a video link."]
1858    MAV_CMD_EXTERNAL_POSITION_ESTIMATE = 43003,
1859    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1860    MAV_CMD_WAYPOINT_USER_1 = 31000,
1861    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1862    MAV_CMD_WAYPOINT_USER_2 = 31001,
1863    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1864    MAV_CMD_WAYPOINT_USER_3 = 31002,
1865    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1866    MAV_CMD_WAYPOINT_USER_4 = 31003,
1867    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1868    MAV_CMD_WAYPOINT_USER_5 = 31004,
1869    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1870    MAV_CMD_SPATIAL_USER_1 = 31005,
1871    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1872    MAV_CMD_SPATIAL_USER_2 = 31006,
1873    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1874    MAV_CMD_SPATIAL_USER_3 = 31007,
1875    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1876    MAV_CMD_SPATIAL_USER_4 = 31008,
1877    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1878    MAV_CMD_SPATIAL_USER_5 = 31009,
1879    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1880    MAV_CMD_USER_1 = 31010,
1881    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1882    MAV_CMD_USER_2 = 31011,
1883    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1884    MAV_CMD_USER_3 = 31012,
1885    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1886    MAV_CMD_USER_4 = 31013,
1887    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1888    MAV_CMD_USER_5 = 31014,
1889    #[doc = "Request forwarding of CAN packets from the given CAN bus to this component. CAN Frames are sent using CAN_FRAME and CANFD_FRAME messages"]
1890    MAV_CMD_CAN_FORWARD = 32000,
1891    #[doc = "Fly a figure eight path as defined by the parameters.           Set parameters to NaN/INT32_MAX (as appropriate) to use system-default values.           The command is intended for fixed wing vehicles (and VTOL hybrids flying in fixed-wing mode), allowing POI tracking for gimbals that don't support infinite rotation.           This command only defines the flight path. Speed should be set independently (use e.g. MAV_CMD_DO_CHANGE_SPEED).           Yaw and other degrees of freedom are not specified, and will be flight-stack specific (on vehicles where they can be controlled independent of the heading)."]
1892    MAV_CMD_DO_FIGURE_EIGHT = 35,
1893    #[doc = "Request a target system to start an upgrade of one (or all) of its components.           For example, the command might be sent to a companion computer to cause it to upgrade a connected flight controller.           The system doing the upgrade will report progress using the normal command protocol sequence for a long running operation.           Command protocol information: <https://mavlink.io/en/services/command.html>."]
1894    MAV_CMD_DO_UPGRADE = 247,
1895    #[doc = "Allows setting an AT S command of an SiK radio."]
1896    MAV_CMD_SET_AT_S_PARAM = 550,
1897    #[doc = "Set system and component id.           This allows moving of a system and all its components to a new system id, or moving a particular component to a new system/component id.           Recipients must reject command addressed to broadcast system ID."]
1898    MAV_CMD_DO_SET_SYS_CMP_ID = 610,
1899    #[doc = "Sets the GNSS coordinates of the vehicle local origin (0,0,0) position.           Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed.           This enables transform between the local coordinate frame and the global (GNSS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor.           This command supersedes SET_GPS_GLOBAL_ORIGIN.           Should be sent in a COMMAND_INT (Expected frame is MAV_FRAME_GLOBAL, and this should be assumed when sent in COMMAND_LONG)."]
1900    MAV_CMD_DO_SET_GLOBAL_ORIGIN = 611,
1901    #[doc = "Used to manually set/unset emergency status for remote id.           This is for compliance with MOC ASTM docs, specifically F358 section 7.7: \"Emergency Status Indicator\".           The requirement can also be satisfied by automatic setting of the emergency status by flight stack, and that approach is preferred.           See <https://mavlink.io/en/services/opendroneid.html> for more information."]
1902    MAV_CMD_ODID_SET_EMERGENCY = 12900,
1903    #[doc = "Set an external estimate of wind direction and speed.           This might be used to provide an initial wind estimate to the estimator (EKF) in the case where the vehicle is wind dead-reckoning, extending the time when operating without GPS before before position drift builds to an unsafe level. For this use case the command might reasonably be sent every few minutes when operating at altitude, and the value is cleared if the estimator resets itself."]
1904    MAV_CMD_EXTERNAL_WIND_ESTIMATE = 43004,
1905    #[doc = "Request GCS control of a system (or of a specific component in a system).            A controlled system should only accept MAVLink commands and command-like messages that are sent by its controlling GCS, or from other components with the same system id.           Commands from other systems should be rejected with MAV_RESULT_FAILED (except for this command, which may be acknowledged with MAV_RESULT_ACCEPTED if control is granted).           Command-like messages should be ignored (or rejected if that is supported by their associated protocol).            GCS control of the whole system is managed via a single component that we will refer to here as the \"system manager component\".           This component streams the CONTROL_STATUS message and sets the GCS_CONTROL_STATUS_FLAGS_SYSTEM_MANAGER flag.           Other components in the system should monitor for the CONTROL_STATUS message with this flag, and set their controlling GCS to match its published system id.           A GCS that wants to control the system should also monitor for the same message and flag, and address the MAV_CMD_REQUEST_OPERATOR_CONTROL to its component id.           Note that integrators are required to ensure that there is only one system manager component in the system (i.e. one component emitting the message with GCS_CONTROL_STATUS_FLAGS_SYSTEM_MANAGER set).            The MAV_CMD_REQUEST_OPERATOR_CONTROL command is sent by a GCS to the system manager component to request or release control of a system, specifying whether subsequent takeover requests from another GCS are automatically granted, or require permission.            The system manager component should grant control to the GCS if the system does not require takeover permission (or is uncontrolled) and ACK the request with MAV_RESULT_ACCEPTED.           The system manager component should then stream CONTROL_STATUS indicating its controlling system: all other components with the same system id should monitor this message and set their own controlling GCS to match that of the system manager component.            If the system manager component cannot grant control (because takeover requires permission), the request should be rejected with MAV_RESULT_FAILED.           The system manager component should then send this same command to the current owning GCS in order to notify of the request.           The owning GCS would ACK with MAV_RESULT_ACCEPTED, and might choose to release control of the vehicle, or re-request control with the takeover bit set to allow permission.           In case it choses to re-request control with takeover bit set to allow permission, requestor GCS will only have 10 seconds to get control, otherwise owning GCS will re-request control with takeover bit set to disallow permission, and requestor GCS will need repeat the request if still interested in getting control.           Note that the pilots of both GCS should co-ordinate safe handover offline.            Note that in most systems the only controlled component will be the \"system manager component\", and that will be the autopilot.           However separate GCS control of a particular component is also permitted, if supported by the component.           In this case the GCS will address MAV_CMD_REQUEST_OPERATOR_CONTROL to the specific component it wants to control.           The component will then stream CONTROL_STATUS for its controlling GCS (it must not set GCS_CONTROL_STATUS_FLAGS_SYSTEM_MANAGER).           The component should fall back to the system GCS (if any) when it is not directly controlled, and may stop emitting CONTROL_STATUS.           The flow is otherwise the same as for requesting control over the whole system."]
1906    MAV_CMD_REQUEST_OPERATOR_CONTROL = 32100,
1907}
1908impl MavCmd {
1909    pub const DEFAULT: Self = Self::MAV_CMD_NAV_WAYPOINT;
1910}
1911impl Default for MavCmd {
1912    fn default() -> Self {
1913        Self::DEFAULT
1914    }
1915}
1916#[cfg_attr(feature = "ts", derive(TS))]
1917#[cfg_attr(feature = "ts", ts(export))]
1918#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1919#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1920#[cfg_attr(feature = "serde", serde(tag = "type"))]
1921#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1922#[repr(u32)]
1923#[doc = "Possible actions an aircraft can take to avoid a collision."]
1924pub enum MavCollisionAction {
1925    #[doc = "Ignore any potential collisions"]
1926    MAV_COLLISION_ACTION_NONE = 0,
1927    #[doc = "Report potential collision"]
1928    MAV_COLLISION_ACTION_REPORT = 1,
1929    #[doc = "Ascend or Descend to avoid threat"]
1930    MAV_COLLISION_ACTION_ASCEND_OR_DESCEND = 2,
1931    #[doc = "Move horizontally to avoid threat"]
1932    MAV_COLLISION_ACTION_MOVE_HORIZONTALLY = 3,
1933    #[doc = "Aircraft to move perpendicular to the collision's velocity vector"]
1934    MAV_COLLISION_ACTION_MOVE_PERPENDICULAR = 4,
1935    #[doc = "Aircraft to fly directly back to its launch point"]
1936    MAV_COLLISION_ACTION_RTL = 5,
1937    #[doc = "Aircraft to stop in place"]
1938    MAV_COLLISION_ACTION_HOVER = 6,
1939}
1940impl MavCollisionAction {
1941    pub const DEFAULT: Self = Self::MAV_COLLISION_ACTION_NONE;
1942}
1943impl Default for MavCollisionAction {
1944    fn default() -> Self {
1945        Self::DEFAULT
1946    }
1947}
1948#[cfg_attr(feature = "ts", derive(TS))]
1949#[cfg_attr(feature = "ts", ts(export))]
1950#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1951#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1952#[cfg_attr(feature = "serde", serde(tag = "type"))]
1953#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1954#[repr(u32)]
1955#[doc = "Source of information about this collision."]
1956pub enum MavCollisionSrc {
1957    #[doc = "ID field references ADSB_VEHICLE packets"]
1958    MAV_COLLISION_SRC_ADSB = 0,
1959    #[doc = "ID field references MAVLink SRC ID"]
1960    MAV_COLLISION_SRC_MAVLINK_GPS_GLOBAL_INT = 1,
1961}
1962impl MavCollisionSrc {
1963    pub const DEFAULT: Self = Self::MAV_COLLISION_SRC_ADSB;
1964}
1965impl Default for MavCollisionSrc {
1966    fn default() -> Self {
1967        Self::DEFAULT
1968    }
1969}
1970#[cfg_attr(feature = "ts", derive(TS))]
1971#[cfg_attr(feature = "ts", ts(export))]
1972#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1973#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1974#[cfg_attr(feature = "serde", serde(tag = "type"))]
1975#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1976#[repr(u32)]
1977#[doc = "Aircraft-rated danger from this threat."]
1978pub enum MavCollisionThreatLevel {
1979    #[doc = "Not a threat"]
1980    MAV_COLLISION_THREAT_LEVEL_NONE = 0,
1981    #[doc = "Craft is mildly concerned about this threat"]
1982    MAV_COLLISION_THREAT_LEVEL_LOW = 1,
1983    #[doc = "Craft is panicking, and may take actions to avoid threat"]
1984    MAV_COLLISION_THREAT_LEVEL_HIGH = 2,
1985}
1986impl MavCollisionThreatLevel {
1987    pub const DEFAULT: Self = Self::MAV_COLLISION_THREAT_LEVEL_NONE;
1988}
1989impl Default for MavCollisionThreatLevel {
1990    fn default() -> Self {
1991        Self::DEFAULT
1992    }
1993}
1994#[cfg_attr(feature = "ts", derive(TS))]
1995#[cfg_attr(feature = "ts", ts(export))]
1996#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1997#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1998#[cfg_attr(feature = "serde", serde(tag = "type"))]
1999#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2000#[repr(u32)]
2001#[doc = "Component ids (values) for the different types and instances of onboard hardware/software that might make up a MAVLink system (autopilot, cameras, servos, GPS systems, avoidance systems etc.).       Components must use the appropriate ID in their source address when sending messages. Components can also use IDs to determine if they are the intended recipient of an incoming message. The MAV_COMP_ID_ALL value is used to indicate messages that must be processed by all components.       When creating new entries, components that can have multiple instances (e.g. cameras, servos etc.) should be allocated sequential values. An appropriate number of values should be left free after these components to allow the number of instances to be expanded."]
2002pub enum MavComponent {
2003    #[doc = "Target id (target_component) used to broadcast messages to all components of the receiving system. Components should attempt to process messages with this component ID and forward to components on any other interfaces. Note: This is not a valid *source* component id for a message."]
2004    MAV_COMP_ID_ALL = 0,
2005    #[doc = "System flight controller component (\"autopilot\"). Only one autopilot is expected in a particular system."]
2006    MAV_COMP_ID_AUTOPILOT1 = 1,
2007    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2008    MAV_COMP_ID_USER1 = 25,
2009    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2010    MAV_COMP_ID_USER2 = 26,
2011    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2012    MAV_COMP_ID_USER3 = 27,
2013    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2014    MAV_COMP_ID_USER4 = 28,
2015    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2016    MAV_COMP_ID_USER5 = 29,
2017    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2018    MAV_COMP_ID_USER6 = 30,
2019    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2020    MAV_COMP_ID_USER7 = 31,
2021    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2022    MAV_COMP_ID_USER8 = 32,
2023    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2024    MAV_COMP_ID_USER9 = 33,
2025    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2026    MAV_COMP_ID_USER10 = 34,
2027    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2028    MAV_COMP_ID_USER11 = 35,
2029    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2030    MAV_COMP_ID_USER12 = 36,
2031    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2032    MAV_COMP_ID_USER13 = 37,
2033    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2034    MAV_COMP_ID_USER14 = 38,
2035    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2036    MAV_COMP_ID_USER15 = 39,
2037    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2038    MAV_COMP_ID_USER16 = 40,
2039    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2040    MAV_COMP_ID_USER17 = 41,
2041    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2042    MAV_COMP_ID_USER18 = 42,
2043    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2044    MAV_COMP_ID_USER19 = 43,
2045    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2046    MAV_COMP_ID_USER20 = 44,
2047    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2048    MAV_COMP_ID_USER21 = 45,
2049    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2050    MAV_COMP_ID_USER22 = 46,
2051    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2052    MAV_COMP_ID_USER23 = 47,
2053    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2054    MAV_COMP_ID_USER24 = 48,
2055    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2056    MAV_COMP_ID_USER25 = 49,
2057    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2058    MAV_COMP_ID_USER26 = 50,
2059    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2060    MAV_COMP_ID_USER27 = 51,
2061    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2062    MAV_COMP_ID_USER28 = 52,
2063    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2064    MAV_COMP_ID_USER29 = 53,
2065    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2066    MAV_COMP_ID_USER30 = 54,
2067    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2068    MAV_COMP_ID_USER31 = 55,
2069    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2070    MAV_COMP_ID_USER32 = 56,
2071    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2072    MAV_COMP_ID_USER33 = 57,
2073    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2074    MAV_COMP_ID_USER34 = 58,
2075    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2076    MAV_COMP_ID_USER35 = 59,
2077    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2078    MAV_COMP_ID_USER36 = 60,
2079    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2080    MAV_COMP_ID_USER37 = 61,
2081    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2082    MAV_COMP_ID_USER38 = 62,
2083    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2084    MAV_COMP_ID_USER39 = 63,
2085    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2086    MAV_COMP_ID_USER40 = 64,
2087    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2088    MAV_COMP_ID_USER41 = 65,
2089    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2090    MAV_COMP_ID_USER42 = 66,
2091    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2092    MAV_COMP_ID_USER43 = 67,
2093    #[doc = "Telemetry radio (e.g. SiK radio, or other component that emits RADIO_STATUS messages)."]
2094    MAV_COMP_ID_TELEMETRY_RADIO = 68,
2095    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2096    MAV_COMP_ID_USER45 = 69,
2097    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2098    MAV_COMP_ID_USER46 = 70,
2099    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2100    MAV_COMP_ID_USER47 = 71,
2101    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2102    MAV_COMP_ID_USER48 = 72,
2103    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2104    MAV_COMP_ID_USER49 = 73,
2105    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2106    MAV_COMP_ID_USER50 = 74,
2107    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2108    MAV_COMP_ID_USER51 = 75,
2109    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2110    MAV_COMP_ID_USER52 = 76,
2111    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2112    MAV_COMP_ID_USER53 = 77,
2113    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2114    MAV_COMP_ID_USER54 = 78,
2115    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2116    MAV_COMP_ID_USER55 = 79,
2117    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2118    MAV_COMP_ID_USER56 = 80,
2119    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2120    MAV_COMP_ID_USER57 = 81,
2121    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2122    MAV_COMP_ID_USER58 = 82,
2123    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2124    MAV_COMP_ID_USER59 = 83,
2125    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2126    MAV_COMP_ID_USER60 = 84,
2127    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2128    MAV_COMP_ID_USER61 = 85,
2129    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2130    MAV_COMP_ID_USER62 = 86,
2131    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2132    MAV_COMP_ID_USER63 = 87,
2133    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2134    MAV_COMP_ID_USER64 = 88,
2135    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2136    MAV_COMP_ID_USER65 = 89,
2137    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2138    MAV_COMP_ID_USER66 = 90,
2139    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2140    MAV_COMP_ID_USER67 = 91,
2141    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2142    MAV_COMP_ID_USER68 = 92,
2143    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2144    MAV_COMP_ID_USER69 = 93,
2145    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2146    MAV_COMP_ID_USER70 = 94,
2147    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2148    MAV_COMP_ID_USER71 = 95,
2149    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2150    MAV_COMP_ID_USER72 = 96,
2151    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2152    MAV_COMP_ID_USER73 = 97,
2153    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2154    MAV_COMP_ID_USER74 = 98,
2155    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
2156    MAV_COMP_ID_USER75 = 99,
2157    #[doc = "Camera #1."]
2158    MAV_COMP_ID_CAMERA = 100,
2159    #[doc = "Camera #2."]
2160    MAV_COMP_ID_CAMERA2 = 101,
2161    #[doc = "Camera #3."]
2162    MAV_COMP_ID_CAMERA3 = 102,
2163    #[doc = "Camera #4."]
2164    MAV_COMP_ID_CAMERA4 = 103,
2165    #[doc = "Camera #5."]
2166    MAV_COMP_ID_CAMERA5 = 104,
2167    #[doc = "Camera #6."]
2168    MAV_COMP_ID_CAMERA6 = 105,
2169    #[doc = "Servo #1."]
2170    MAV_COMP_ID_SERVO1 = 140,
2171    #[doc = "Servo #2."]
2172    MAV_COMP_ID_SERVO2 = 141,
2173    #[doc = "Servo #3."]
2174    MAV_COMP_ID_SERVO3 = 142,
2175    #[doc = "Servo #4."]
2176    MAV_COMP_ID_SERVO4 = 143,
2177    #[doc = "Servo #5."]
2178    MAV_COMP_ID_SERVO5 = 144,
2179    #[doc = "Servo #6."]
2180    MAV_COMP_ID_SERVO6 = 145,
2181    #[doc = "Servo #7."]
2182    MAV_COMP_ID_SERVO7 = 146,
2183    #[doc = "Servo #8."]
2184    MAV_COMP_ID_SERVO8 = 147,
2185    #[doc = "Servo #9."]
2186    MAV_COMP_ID_SERVO9 = 148,
2187    #[doc = "Servo #10."]
2188    MAV_COMP_ID_SERVO10 = 149,
2189    #[doc = "Servo #11."]
2190    MAV_COMP_ID_SERVO11 = 150,
2191    #[doc = "Servo #12."]
2192    MAV_COMP_ID_SERVO12 = 151,
2193    #[doc = "Servo #13."]
2194    MAV_COMP_ID_SERVO13 = 152,
2195    #[doc = "Servo #14."]
2196    MAV_COMP_ID_SERVO14 = 153,
2197    #[doc = "Gimbal #1."]
2198    MAV_COMP_ID_GIMBAL = 154,
2199    #[doc = "Logging component."]
2200    MAV_COMP_ID_LOG = 155,
2201    #[doc = "Automatic Dependent Surveillance-Broadcast (ADS-B) component."]
2202    MAV_COMP_ID_ADSB = 156,
2203    #[doc = "On Screen Display (OSD) devices for video links."]
2204    MAV_COMP_ID_OSD = 157,
2205    #[doc = "Generic autopilot peripheral component ID. Meant for devices that do not implement the parameter microservice."]
2206    MAV_COMP_ID_PERIPHERAL = 158,
2207    #[deprecated = "All gimbals should use MAV_COMP_ID_GIMBAL. See `MAV_COMP_ID_GIMBAL` (Deprecated since 2018-11)"]
2208    #[doc = "Gimbal ID for QX1."]
2209    MAV_COMP_ID_QX1_GIMBAL = 159,
2210    #[doc = "FLARM collision alert component."]
2211    MAV_COMP_ID_FLARM = 160,
2212    #[doc = "Parachute component."]
2213    MAV_COMP_ID_PARACHUTE = 161,
2214    #[doc = "Winch component."]
2215    MAV_COMP_ID_WINCH = 169,
2216    #[doc = "Gimbal #2."]
2217    MAV_COMP_ID_GIMBAL2 = 171,
2218    #[doc = "Gimbal #3."]
2219    MAV_COMP_ID_GIMBAL3 = 172,
2220    #[doc = "Gimbal #4"]
2221    MAV_COMP_ID_GIMBAL4 = 173,
2222    #[doc = "Gimbal #5."]
2223    MAV_COMP_ID_GIMBAL5 = 174,
2224    #[doc = "Gimbal #6."]
2225    MAV_COMP_ID_GIMBAL6 = 175,
2226    #[doc = "Battery #1."]
2227    MAV_COMP_ID_BATTERY = 180,
2228    #[doc = "Battery #2."]
2229    MAV_COMP_ID_BATTERY2 = 181,
2230    #[doc = "CAN over MAVLink client."]
2231    MAV_COMP_ID_MAVCAN = 189,
2232    #[doc = "Component that can generate/supply a mission flight plan (e.g. GCS or developer API)."]
2233    MAV_COMP_ID_MISSIONPLANNER = 190,
2234    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2235    MAV_COMP_ID_ONBOARD_COMPUTER = 191,
2236    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2237    MAV_COMP_ID_ONBOARD_COMPUTER2 = 192,
2238    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2239    MAV_COMP_ID_ONBOARD_COMPUTER3 = 193,
2240    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
2241    MAV_COMP_ID_ONBOARD_COMPUTER4 = 194,
2242    #[doc = "Component that finds an optimal path between points based on a certain constraint (e.g. minimum snap, shortest path, cost, etc.)."]
2243    MAV_COMP_ID_PATHPLANNER = 195,
2244    #[doc = "Component that plans a collision free path between two points."]
2245    MAV_COMP_ID_OBSTACLE_AVOIDANCE = 196,
2246    #[doc = "Component that provides position estimates using VIO techniques."]
2247    MAV_COMP_ID_VISUAL_INERTIAL_ODOMETRY = 197,
2248    #[doc = "Component that manages pairing of vehicle and GCS."]
2249    MAV_COMP_ID_PAIRING_MANAGER = 198,
2250    #[doc = "Inertial Measurement Unit (IMU) #1."]
2251    MAV_COMP_ID_IMU = 200,
2252    #[doc = "Inertial Measurement Unit (IMU) #2."]
2253    MAV_COMP_ID_IMU_2 = 201,
2254    #[doc = "Inertial Measurement Unit (IMU) #3."]
2255    MAV_COMP_ID_IMU_3 = 202,
2256    #[doc = "GPS #1."]
2257    MAV_COMP_ID_GPS = 220,
2258    #[doc = "GPS #2."]
2259    MAV_COMP_ID_GPS2 = 221,
2260    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2261    MAV_COMP_ID_ODID_TXRX_1 = 236,
2262    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2263    MAV_COMP_ID_ODID_TXRX_2 = 237,
2264    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2265    MAV_COMP_ID_ODID_TXRX_3 = 238,
2266    #[doc = "Component to bridge MAVLink to UDP (i.e. from a UART)."]
2267    MAV_COMP_ID_UDP_BRIDGE = 240,
2268    #[doc = "Component to bridge to UART (i.e. from UDP)."]
2269    MAV_COMP_ID_UART_BRIDGE = 241,
2270    #[doc = "Component handling TUNNEL messages (e.g. vendor specific GUI of a component)."]
2271    MAV_COMP_ID_TUNNEL_NODE = 242,
2272    #[doc = "Illuminator"]
2273    MAV_COMP_ID_ILLUMINATOR = 243,
2274    #[deprecated = "System control does not require a separate component ID. Instead, system commands should be sent with target_component=MAV_COMP_ID_ALL allowing the target component to use any appropriate component id. See `MAV_COMP_ID_ALL` (Deprecated since 2018-11)"]
2275    #[doc = "Deprecated, don't use. Component for handling system messages (e.g. to ARM, takeoff, etc.)."]
2276    MAV_COMP_ID_SYSTEM_CONTROL = 250,
2277}
2278impl MavComponent {
2279    pub const DEFAULT: Self = Self::MAV_COMP_ID_ALL;
2280}
2281impl Default for MavComponent {
2282    fn default() -> Self {
2283        Self::DEFAULT
2284    }
2285}
2286#[cfg_attr(feature = "ts", derive(TS))]
2287#[cfg_attr(feature = "ts", ts(export))]
2288#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2289#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2290#[cfg_attr(feature = "serde", serde(tag = "type"))]
2291#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2292#[repr(u32)]
2293#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-06)"]
2294#[doc = "A data stream is not a fixed set of messages, but rather a      recommendation to the autopilot software. Individual autopilots may or may not obey      the recommended messages."]
2295pub enum MavDataStream {
2296    #[doc = "Enable all data streams"]
2297    MAV_DATA_STREAM_ALL = 0,
2298    #[doc = "Enable IMU_RAW, GPS_RAW, GPS_STATUS packets."]
2299    MAV_DATA_STREAM_RAW_SENSORS = 1,
2300    #[doc = "Enable GPS_STATUS, CONTROL_STATUS, AUX_STATUS"]
2301    MAV_DATA_STREAM_EXTENDED_STATUS = 2,
2302    #[doc = "Enable RC_CHANNELS_SCALED, RC_CHANNELS_RAW, SERVO_OUTPUT_RAW"]
2303    MAV_DATA_STREAM_RC_CHANNELS = 3,
2304    #[doc = "Enable ATTITUDE_CONTROLLER_OUTPUT, POSITION_CONTROLLER_OUTPUT, NAV_CONTROLLER_OUTPUT."]
2305    MAV_DATA_STREAM_RAW_CONTROLLER = 4,
2306    #[doc = "Enable LOCAL_POSITION, GLOBAL_POSITION_INT messages."]
2307    MAV_DATA_STREAM_POSITION = 6,
2308    #[doc = "Dependent on the autopilot"]
2309    MAV_DATA_STREAM_EXTRA1 = 10,
2310    #[doc = "Dependent on the autopilot"]
2311    MAV_DATA_STREAM_EXTRA2 = 11,
2312    #[doc = "Dependent on the autopilot"]
2313    MAV_DATA_STREAM_EXTRA3 = 12,
2314}
2315impl MavDataStream {
2316    pub const DEFAULT: Self = Self::MAV_DATA_STREAM_ALL;
2317}
2318impl Default for MavDataStream {
2319    fn default() -> Self {
2320        Self::DEFAULT
2321    }
2322}
2323#[cfg_attr(feature = "ts", derive(TS))]
2324#[cfg_attr(feature = "ts", ts(export))]
2325#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2326#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2327#[cfg_attr(feature = "serde", serde(tag = "type"))]
2328#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2329#[repr(u32)]
2330#[doc = "Enumeration of distance sensor types"]
2331pub enum MavDistanceSensor {
2332    #[doc = "Laser rangefinder, e.g. LightWare SF02/F or PulsedLight units"]
2333    MAV_DISTANCE_SENSOR_LASER = 0,
2334    #[doc = "Ultrasound rangefinder, e.g. MaxBotix units"]
2335    MAV_DISTANCE_SENSOR_ULTRASOUND = 1,
2336    #[doc = "Infrared rangefinder, e.g. Sharp units"]
2337    MAV_DISTANCE_SENSOR_INFRARED = 2,
2338    #[doc = "Radar type, e.g. uLanding units"]
2339    MAV_DISTANCE_SENSOR_RADAR = 3,
2340    #[doc = "Broken or unknown type, e.g. analog units"]
2341    MAV_DISTANCE_SENSOR_UNKNOWN = 4,
2342}
2343impl MavDistanceSensor {
2344    pub const DEFAULT: Self = Self::MAV_DISTANCE_SENSOR_LASER;
2345}
2346impl Default for MavDistanceSensor {
2347    fn default() -> Self {
2348        Self::DEFAULT
2349    }
2350}
2351#[cfg_attr(feature = "ts", derive(TS))]
2352#[cfg_attr(feature = "ts", ts(export))]
2353#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2354#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2355#[cfg_attr(feature = "serde", serde(tag = "type"))]
2356#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2357#[repr(u32)]
2358#[doc = "Bitmap of options for the MAV_CMD_DO_REPOSITION"]
2359pub enum MavDoRepositionFlags {
2360    #[doc = "The aircraft should immediately transition into guided. This should not be set for follow me applications"]
2361    MAV_DO_REPOSITION_FLAGS_CHANGE_MODE = 1,
2362}
2363impl MavDoRepositionFlags {
2364    pub const DEFAULT: Self = Self::MAV_DO_REPOSITION_FLAGS_CHANGE_MODE;
2365}
2366impl Default for MavDoRepositionFlags {
2367    fn default() -> Self {
2368        Self::DEFAULT
2369    }
2370}
2371#[cfg_attr(feature = "ts", derive(TS))]
2372#[cfg_attr(feature = "ts", ts(export))]
2373#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2374#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2375#[cfg_attr(feature = "serde", serde(tag = "type"))]
2376#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2377#[repr(u32)]
2378#[doc = "Enumeration of estimator types"]
2379pub enum MavEstimatorType {
2380    #[doc = "Unknown type of the estimator."]
2381    MAV_ESTIMATOR_TYPE_UNKNOWN = 0,
2382    #[doc = "This is a naive estimator without any real covariance feedback."]
2383    MAV_ESTIMATOR_TYPE_NAIVE = 1,
2384    #[doc = "Computer vision based estimate. Might be up to scale."]
2385    MAV_ESTIMATOR_TYPE_VISION = 2,
2386    #[doc = "Visual-inertial estimate."]
2387    MAV_ESTIMATOR_TYPE_VIO = 3,
2388    #[doc = "Plain GPS estimate."]
2389    MAV_ESTIMATOR_TYPE_GPS = 4,
2390    #[doc = "Estimator integrating GPS and inertial sensing."]
2391    MAV_ESTIMATOR_TYPE_GPS_INS = 5,
2392    #[doc = "Estimate from external motion capturing system."]
2393    MAV_ESTIMATOR_TYPE_MOCAP = 6,
2394    #[doc = "Estimator based on lidar sensor input."]
2395    MAV_ESTIMATOR_TYPE_LIDAR = 7,
2396    #[doc = "Estimator on autopilot."]
2397    MAV_ESTIMATOR_TYPE_AUTOPILOT = 8,
2398}
2399impl MavEstimatorType {
2400    pub const DEFAULT: Self = Self::MAV_ESTIMATOR_TYPE_UNKNOWN;
2401}
2402impl Default for MavEstimatorType {
2403    fn default() -> Self {
2404        Self::DEFAULT
2405    }
2406}
2407#[cfg_attr(feature = "ts", derive(TS))]
2408#[cfg_attr(feature = "ts", ts(export))]
2409#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2410#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2411#[cfg_attr(feature = "serde", serde(tag = "type"))]
2412#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2413#[repr(u32)]
2414#[doc = "Flags for CURRENT_EVENT_SEQUENCE."]
2415pub enum MavEventCurrentSequenceFlags {
2416    #[doc = "A sequence reset has happened (e.g. vehicle reboot)."]
2417    MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET = 1,
2418}
2419impl MavEventCurrentSequenceFlags {
2420    pub const DEFAULT: Self = Self::MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET;
2421}
2422impl Default for MavEventCurrentSequenceFlags {
2423    fn default() -> Self {
2424        Self::DEFAULT
2425    }
2426}
2427#[cfg_attr(feature = "ts", derive(TS))]
2428#[cfg_attr(feature = "ts", ts(export))]
2429#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2430#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2431#[cfg_attr(feature = "serde", serde(tag = "type"))]
2432#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2433#[repr(u32)]
2434#[doc = "Reason for an event error response."]
2435pub enum MavEventErrorReason {
2436    #[doc = "The requested event is not available (anymore)."]
2437    MAV_EVENT_ERROR_REASON_UNAVAILABLE = 0,
2438}
2439impl MavEventErrorReason {
2440    pub const DEFAULT: Self = Self::MAV_EVENT_ERROR_REASON_UNAVAILABLE;
2441}
2442impl Default for MavEventErrorReason {
2443    fn default() -> Self {
2444        Self::DEFAULT
2445    }
2446}
2447#[cfg_attr(feature = "ts", derive(TS))]
2448#[cfg_attr(feature = "ts", ts(export))]
2449#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2450#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2451#[cfg_attr(feature = "serde", serde(tag = "type"))]
2452#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2453#[repr(u32)]
2454#[doc = "Coordinate frames used by MAVLink. Not all frames are supported by all commands, messages, or vehicles.        Global frames use the following naming conventions:       - \"GLOBAL\": Global coordinate frame with WGS84 latitude/longitude and altitude positive over mean sea level (MSL) by default.         The following modifiers may be used with \"GLOBAL\":         - \"RELATIVE_ALT\": Altitude is relative to the vehicle home position rather than MSL.         - \"TERRAIN_ALT\": Altitude is relative to ground level rather than MSL.         - \"INT\": Latitude/longitude (in degrees) are scaled by multiplying by 1E7.        Local frames use the following naming conventions:       - \"LOCAL\": Origin of local frame is fixed relative to earth. Unless otherwise specified this origin is the origin of the vehicle position-estimator (\"EKF\").       - \"BODY\": Origin of local frame travels with the vehicle. NOTE, \"BODY\" does NOT indicate alignment of frame axis with vehicle attitude.       - \"OFFSET\": Deprecated synonym for \"BODY\" (origin travels with the vehicle). Not to be used for new frames.        Some deprecated frames do not follow these conventions (e.g. MAV_FRAME_BODY_NED and MAV_FRAME_BODY_OFFSET_NED)."]
2455pub enum MavFrame {
2456    #[doc = "Global (WGS84) coordinate frame + altitude relative to mean sea level (MSL)."]
2457    MAV_FRAME_GLOBAL = 0,
2458    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin fixed relative to earth."]
2459    MAV_FRAME_LOCAL_NED = 1,
2460    #[doc = "NOT a coordinate frame, indicates a mission command."]
2461    MAV_FRAME_MISSION = 2,
2462    #[doc = "Global (WGS84) coordinate frame + altitude relative to the home position."]
2463    MAV_FRAME_GLOBAL_RELATIVE_ALT = 3,
2464    #[doc = "ENU local tangent frame (x: East, y: North, z: Up) with origin fixed relative to earth."]
2465    MAV_FRAME_LOCAL_ENU = 4,
2466    #[deprecated = "Use MAV_FRAME_GLOBAL in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL` (Deprecated since 2024-03)"]
2467    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to mean sea level (MSL)."]
2468    MAV_FRAME_GLOBAL_INT = 5,
2469    #[deprecated = "Use MAV_FRAME_GLOBAL_RELATIVE_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_RELATIVE_ALT` (Deprecated since 2024-03)"]
2470    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to the home position."]
2471    MAV_FRAME_GLOBAL_RELATIVE_ALT_INT = 6,
2472    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin that travels with the vehicle."]
2473    MAV_FRAME_LOCAL_OFFSET_NED = 7,
2474    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
2475    #[doc = "Same as MAV_FRAME_LOCAL_NED when used to represent position values. Same as MAV_FRAME_BODY_FRD when used with velocity/acceleration values."]
2476    MAV_FRAME_BODY_NED = 8,
2477    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
2478    #[doc = "This is the same as MAV_FRAME_BODY_FRD."]
2479    MAV_FRAME_BODY_OFFSET_NED = 9,
2480    #[doc = "Global (WGS84) coordinate frame with AGL altitude (altitude at ground level)."]
2481    MAV_FRAME_GLOBAL_TERRAIN_ALT = 10,
2482    #[deprecated = "Use MAV_FRAME_GLOBAL_TERRAIN_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_TERRAIN_ALT` (Deprecated since 2024-03)"]
2483    #[doc = "Global (WGS84) coordinate frame (scaled) with AGL altitude (altitude at ground level)."]
2484    MAV_FRAME_GLOBAL_TERRAIN_ALT_INT = 11,
2485    #[doc = "FRD local frame aligned to the vehicle's attitude (x: Forward, y: Right, z: Down) with an origin that travels with vehicle."]
2486    MAV_FRAME_BODY_FRD = 12,
2487    #[deprecated = "  (Deprecated since 2019-04)"]
2488    #[doc = "MAV_FRAME_BODY_FLU - Body fixed frame of reference, Z-up (x: Forward, y: Left, z: Up)."]
2489    MAV_FRAME_RESERVED_13 = 13,
2490    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2491    #[doc = "MAV_FRAME_MOCAP_NED - Odometry local coordinate frame of data given by a motion capture system, Z-down (x: North, y: East, z: Down)."]
2492    MAV_FRAME_RESERVED_14 = 14,
2493    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2494    #[doc = "MAV_FRAME_MOCAP_ENU - Odometry local coordinate frame of data given by a motion capture system, Z-up (x: East, y: North, z: Up)."]
2495    MAV_FRAME_RESERVED_15 = 15,
2496    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2497    #[doc = "MAV_FRAME_VISION_NED - Odometry local coordinate frame of data given by a vision estimation system, Z-down (x: North, y: East, z: Down)."]
2498    MAV_FRAME_RESERVED_16 = 16,
2499    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2500    #[doc = "MAV_FRAME_VISION_ENU - Odometry local coordinate frame of data given by a vision estimation system, Z-up (x: East, y: North, z: Up)."]
2501    MAV_FRAME_RESERVED_17 = 17,
2502    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2503    #[doc = "MAV_FRAME_ESTIM_NED - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-down (x: North, y: East, z: Down)."]
2504    MAV_FRAME_RESERVED_18 = 18,
2505    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2506    #[doc = "MAV_FRAME_ESTIM_ENU - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-up (x: East, y: North, z: Up)."]
2507    MAV_FRAME_RESERVED_19 = 19,
2508    #[doc = "FRD local tangent frame (x: Forward, y: Right, z: Down) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2509    MAV_FRAME_LOCAL_FRD = 20,
2510    #[doc = "FLU local tangent frame (x: Forward, y: Left, z: Up) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2511    MAV_FRAME_LOCAL_FLU = 21,
2512}
2513impl MavFrame {
2514    pub const DEFAULT: Self = Self::MAV_FRAME_GLOBAL;
2515}
2516impl Default for MavFrame {
2517    fn default() -> Self {
2518        Self::DEFAULT
2519    }
2520}
2521#[cfg_attr(feature = "ts", derive(TS))]
2522#[cfg_attr(feature = "ts", ts(export))]
2523#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2524#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2525#[cfg_attr(feature = "serde", serde(tag = "type"))]
2526#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2527#[repr(u32)]
2528#[doc = "MAV FTP error codes (<https://mavlink.io/en/services/ftp.html>)"]
2529pub enum MavFtpErr {
2530    #[doc = "None: No error"]
2531    MAV_FTP_ERR_NONE = 0,
2532    #[doc = "Fail: Unknown failure"]
2533    MAV_FTP_ERR_FAIL = 1,
2534    #[doc = "FailErrno: Command failed, Err number sent back in PayloadHeader.data[1]. \t\tThis is a file-system error number understood by the server operating system."]
2535    MAV_FTP_ERR_FAILERRNO = 2,
2536    #[doc = "InvalidDataSize: Payload size is invalid"]
2537    MAV_FTP_ERR_INVALIDDATASIZE = 3,
2538    #[doc = "InvalidSession: Session is not currently open"]
2539    MAV_FTP_ERR_INVALIDSESSION = 4,
2540    #[doc = "NoSessionsAvailable: All available sessions are already in use"]
2541    MAV_FTP_ERR_NOSESSIONSAVAILABLE = 5,
2542    #[doc = "EOF: Offset past end of file for ListDirectory and ReadFile commands"]
2543    MAV_FTP_ERR_EOF = 6,
2544    #[doc = "UnknownCommand: Unknown command / opcode"]
2545    MAV_FTP_ERR_UNKNOWNCOMMAND = 7,
2546    #[doc = "FileExists: File/directory already exists"]
2547    MAV_FTP_ERR_FILEEXISTS = 8,
2548    #[doc = "FileProtected: File/directory is write protected"]
2549    MAV_FTP_ERR_FILEPROTECTED = 9,
2550    #[doc = "FileNotFound: File/directory not found"]
2551    MAV_FTP_ERR_FILENOTFOUND = 10,
2552}
2553impl MavFtpErr {
2554    pub const DEFAULT: Self = Self::MAV_FTP_ERR_NONE;
2555}
2556impl Default for MavFtpErr {
2557    fn default() -> Self {
2558        Self::DEFAULT
2559    }
2560}
2561#[cfg_attr(feature = "ts", derive(TS))]
2562#[cfg_attr(feature = "ts", ts(export))]
2563#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2564#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2565#[cfg_attr(feature = "serde", serde(tag = "type"))]
2566#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2567#[repr(u32)]
2568#[doc = "MAV FTP opcodes: <https://mavlink.io/en/services/ftp.html>"]
2569pub enum MavFtpOpcode {
2570    #[doc = "None. Ignored, always ACKed"]
2571    MAV_FTP_OPCODE_NONE = 0,
2572    #[doc = "TerminateSession: Terminates open Read session"]
2573    MAV_FTP_OPCODE_TERMINATESESSION = 1,
2574    #[doc = "ResetSessions: Terminates all open read sessions"]
2575    MAV_FTP_OPCODE_RESETSESSION = 2,
2576    #[doc = "ListDirectory. List files and directories in path from offset"]
2577    MAV_FTP_OPCODE_LISTDIRECTORY = 3,
2578    #[doc = "OpenFileRO: Opens file at path for reading, returns session"]
2579    MAV_FTP_OPCODE_OPENFILERO = 4,
2580    #[doc = "ReadFile: Reads size bytes from offset in session"]
2581    MAV_FTP_OPCODE_READFILE = 5,
2582    #[doc = "CreateFile: Creates file at path for writing, returns session"]
2583    MAV_FTP_OPCODE_CREATEFILE = 6,
2584    #[doc = "WriteFile: Writes size bytes to offset in session"]
2585    MAV_FTP_OPCODE_WRITEFILE = 7,
2586    #[doc = "RemoveFile: Remove file at path"]
2587    MAV_FTP_OPCODE_REMOVEFILE = 8,
2588    #[doc = "CreateDirectory: Creates directory at path"]
2589    MAV_FTP_OPCODE_CREATEDIRECTORY = 9,
2590    #[doc = "RemoveDirectory: Removes directory at path. The directory must be empty."]
2591    MAV_FTP_OPCODE_REMOVEDIRECTORY = 10,
2592    #[doc = "OpenFileWO: Opens file at path for writing, returns session"]
2593    MAV_FTP_OPCODE_OPENFILEWO = 11,
2594    #[doc = "TruncateFile: Truncate file at path to offset length"]
2595    MAV_FTP_OPCODE_TRUNCATEFILE = 12,
2596    #[doc = "Rename: Rename path1 to path2"]
2597    MAV_FTP_OPCODE_RENAME = 13,
2598    #[doc = "CalcFileCRC32: Calculate CRC32 for file at path"]
2599    MAV_FTP_OPCODE_CALCFILECRC = 14,
2600    #[doc = "BurstReadFile: Burst download session file"]
2601    MAV_FTP_OPCODE_BURSTREADFILE = 15,
2602    #[doc = "ACK: ACK response"]
2603    MAV_FTP_OPCODE_ACK = 128,
2604    #[doc = "NAK: NAK response"]
2605    MAV_FTP_OPCODE_NAK = 129,
2606}
2607impl MavFtpOpcode {
2608    pub const DEFAULT: Self = Self::MAV_FTP_OPCODE_NONE;
2609}
2610impl Default for MavFtpOpcode {
2611    fn default() -> Self {
2612        Self::DEFAULT
2613    }
2614}
2615#[cfg_attr(feature = "ts", derive(TS))]
2616#[cfg_attr(feature = "ts", ts(export))]
2617#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2618#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2619#[cfg_attr(feature = "serde", serde(tag = "type"))]
2620#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2621#[repr(u32)]
2622#[doc = "Fuel types for use in FUEL_TYPE. Fuel types specify the units for the maximum, available and consumed fuel, and for the flow rates."]
2623pub enum MavFuelType {
2624    #[doc = "Not specified. Fuel levels are normalized (i.e. maximum is 1, and other levels are relative to 1)."]
2625    MAV_FUEL_TYPE_UNKNOWN = 0,
2626    #[doc = "A generic liquid fuel. Fuel levels are in millilitres (ml). Fuel rates are in millilitres/second."]
2627    MAV_FUEL_TYPE_LIQUID = 1,
2628    #[doc = "A gas tank. Fuel levels are in kilo-Pascal (kPa), and flow rates are in milliliters per second (ml/s)."]
2629    MAV_FUEL_TYPE_GAS = 2,
2630}
2631impl MavFuelType {
2632    pub const DEFAULT: Self = Self::MAV_FUEL_TYPE_UNKNOWN;
2633}
2634impl Default for MavFuelType {
2635    fn default() -> Self {
2636        Self::DEFAULT
2637    }
2638}
2639bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report status/failure cases for a power generator (used in GENERATOR_STATUS). Note that FAULTS are conditions that cause the generator to fail. Warnings are conditions that require attention before the next use (they indicate the system is not operating properly)."] pub struct MavGeneratorStatusFlag : u64 { # [doc = "Generator is off."] const MAV_GENERATOR_STATUS_FLAG_OFF = 1 ; # [doc = "Generator is ready to start generating power."] const MAV_GENERATOR_STATUS_FLAG_READY = 2 ; # [doc = "Generator is generating power."] const MAV_GENERATOR_STATUS_FLAG_GENERATING = 4 ; # [doc = "Generator is charging the batteries (generating enough power to charge and provide the load)."] const MAV_GENERATOR_STATUS_FLAG_CHARGING = 8 ; # [doc = "Generator is operating at a reduced maximum power."] const MAV_GENERATOR_STATUS_FLAG_REDUCED_POWER = 16 ; # [doc = "Generator is providing the maximum output."] const MAV_GENERATOR_STATUS_FLAG_MAXPOWER = 32 ; # [doc = "Generator is near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_WARNING = 64 ; # [doc = "Generator hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_FAULT = 128 ; # [doc = "Power electronics are near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_WARNING = 256 ; # [doc = "Power electronics hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_FAULT = 512 ; # [doc = "Power electronics experienced a fault and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_FAULT = 1024 ; # [doc = "The power source supplying the generator failed e.g. mechanical generator stopped, tether is no longer providing power, solar cell is in shade, hydrogen reaction no longer happening."] const MAV_GENERATOR_STATUS_FLAG_POWERSOURCE_FAULT = 2048 ; # [doc = "Generator controller having communication problems."] const MAV_GENERATOR_STATUS_FLAG_COMMUNICATION_WARNING = 4096 ; # [doc = "Power electronic or generator cooling system error."] const MAV_GENERATOR_STATUS_FLAG_COOLING_WARNING = 8192 ; # [doc = "Generator controller power rail experienced a fault."] const MAV_GENERATOR_STATUS_FLAG_POWER_RAIL_FAULT = 16384 ; # [doc = "Generator controller exceeded the overcurrent threshold and shutdown to prevent damage."] const MAV_GENERATOR_STATUS_FLAG_OVERCURRENT_FAULT = 32768 ; # [doc = "Generator controller detected a high current going into the batteries and shutdown to prevent battery damage."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_OVERCHARGE_CURRENT_FAULT = 65536 ; # [doc = "Generator controller exceeded it's overvoltage threshold and shutdown to prevent it exceeding the voltage rating."] const MAV_GENERATOR_STATUS_FLAG_OVERVOLTAGE_FAULT = 131072 ; # [doc = "Batteries are under voltage (generator will not start)."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_UNDERVOLT_FAULT = 262144 ; # [doc = "Generator start is inhibited by e.g. a safety switch."] const MAV_GENERATOR_STATUS_FLAG_START_INHIBITED = 524288 ; # [doc = "Generator requires maintenance."] const MAV_GENERATOR_STATUS_FLAG_MAINTENANCE_REQUIRED = 1048576 ; # [doc = "Generator is not ready to generate yet."] const MAV_GENERATOR_STATUS_FLAG_WARMING_UP = 2097152 ; # [doc = "Generator is idle."] const MAV_GENERATOR_STATUS_FLAG_IDLE = 4194304 ; } }
2640impl MavGeneratorStatusFlag {
2641    pub const DEFAULT: Self = Self::MAV_GENERATOR_STATUS_FLAG_OFF;
2642}
2643impl Default for MavGeneratorStatusFlag {
2644    fn default() -> Self {
2645        Self::DEFAULT
2646    }
2647}
2648#[cfg_attr(feature = "ts", derive(TS))]
2649#[cfg_attr(feature = "ts", ts(export))]
2650#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2651#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2652#[cfg_attr(feature = "serde", serde(tag = "type"))]
2653#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2654#[repr(u32)]
2655#[doc = "Actions that may be specified in MAV_CMD_OVERRIDE_GOTO to override mission execution."]
2656pub enum MavGoto {
2657    #[doc = "Hold at the current position."]
2658    MAV_GOTO_DO_HOLD = 0,
2659    #[doc = "Continue with the next item in mission execution."]
2660    MAV_GOTO_DO_CONTINUE = 1,
2661    #[doc = "Hold at the current position of the system"]
2662    MAV_GOTO_HOLD_AT_CURRENT_POSITION = 2,
2663    #[doc = "Hold at the position specified in the parameters of the DO_HOLD action"]
2664    MAV_GOTO_HOLD_AT_SPECIFIED_POSITION = 3,
2665}
2666impl MavGoto {
2667    pub const DEFAULT: Self = Self::MAV_GOTO_DO_HOLD;
2668}
2669impl Default for MavGoto {
2670    fn default() -> Self {
2671        Self::DEFAULT
2672    }
2673}
2674#[cfg_attr(feature = "ts", derive(TS))]
2675#[cfg_attr(feature = "ts", ts(export))]
2676#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2677#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2678#[cfg_attr(feature = "serde", serde(tag = "type"))]
2679#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2680#[repr(u32)]
2681#[doc = "Enumeration of landed detector states"]
2682pub enum MavLandedState {
2683    #[doc = "MAV landed state is unknown"]
2684    MAV_LANDED_STATE_UNDEFINED = 0,
2685    #[doc = "MAV is landed (on ground)"]
2686    MAV_LANDED_STATE_ON_GROUND = 1,
2687    #[doc = "MAV is in air"]
2688    MAV_LANDED_STATE_IN_AIR = 2,
2689    #[doc = "MAV currently taking off"]
2690    MAV_LANDED_STATE_TAKEOFF = 3,
2691    #[doc = "MAV currently landing"]
2692    MAV_LANDED_STATE_LANDING = 4,
2693}
2694impl MavLandedState {
2695    pub const DEFAULT: Self = Self::MAV_LANDED_STATE_UNDEFINED;
2696}
2697impl Default for MavLandedState {
2698    fn default() -> Self {
2699        Self::DEFAULT
2700    }
2701}
2702#[cfg_attr(feature = "ts", derive(TS))]
2703#[cfg_attr(feature = "ts", ts(export))]
2704#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2705#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2706#[cfg_attr(feature = "serde", serde(tag = "type"))]
2707#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2708#[repr(u32)]
2709#[doc = "Result of mission operation (in a MISSION_ACK message)."]
2710pub enum MavMissionResult {
2711    #[doc = "mission accepted OK"]
2712    MAV_MISSION_ACCEPTED = 0,
2713    #[doc = "Generic error / not accepting mission commands at all right now."]
2714    MAV_MISSION_ERROR = 1,
2715    #[doc = "Coordinate frame is not supported."]
2716    MAV_MISSION_UNSUPPORTED_FRAME = 2,
2717    #[doc = "Command is not supported."]
2718    MAV_MISSION_UNSUPPORTED = 3,
2719    #[doc = "Mission items exceed storage space."]
2720    MAV_MISSION_NO_SPACE = 4,
2721    #[doc = "One of the parameters has an invalid value."]
2722    MAV_MISSION_INVALID = 5,
2723    #[doc = "param1 has an invalid value."]
2724    MAV_MISSION_INVALID_PARAM1 = 6,
2725    #[doc = "param2 has an invalid value."]
2726    MAV_MISSION_INVALID_PARAM2 = 7,
2727    #[doc = "param3 has an invalid value."]
2728    MAV_MISSION_INVALID_PARAM3 = 8,
2729    #[doc = "param4 has an invalid value."]
2730    MAV_MISSION_INVALID_PARAM4 = 9,
2731    #[doc = "x / param5 has an invalid value."]
2732    MAV_MISSION_INVALID_PARAM5_X = 10,
2733    #[doc = "y / param6 has an invalid value."]
2734    MAV_MISSION_INVALID_PARAM6_Y = 11,
2735    #[doc = "z / param7 has an invalid value."]
2736    MAV_MISSION_INVALID_PARAM7 = 12,
2737    #[doc = "Mission item received out of sequence"]
2738    MAV_MISSION_INVALID_SEQUENCE = 13,
2739    #[doc = "Not accepting any mission commands from this communication partner."]
2740    MAV_MISSION_DENIED = 14,
2741    #[doc = "Current mission operation cancelled (e.g. mission upload, mission download)."]
2742    MAV_MISSION_OPERATION_CANCELLED = 15,
2743}
2744impl MavMissionResult {
2745    pub const DEFAULT: Self = Self::MAV_MISSION_ACCEPTED;
2746}
2747impl Default for MavMissionResult {
2748    fn default() -> Self {
2749        Self::DEFAULT
2750    }
2751}
2752#[cfg_attr(feature = "ts", derive(TS))]
2753#[cfg_attr(feature = "ts", ts(export))]
2754#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2755#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2756#[cfg_attr(feature = "serde", serde(tag = "type"))]
2757#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2758#[repr(u32)]
2759#[doc = "Type of mission items being requested/sent in mission protocol."]
2760pub enum MavMissionType {
2761    #[doc = "Items are mission commands for main mission."]
2762    MAV_MISSION_TYPE_MISSION = 0,
2763    #[doc = "Specifies GeoFence area(s). Items are MAV_CMD_NAV_FENCE_ GeoFence items."]
2764    MAV_MISSION_TYPE_FENCE = 1,
2765    #[doc = "Specifies the rally points for the vehicle. Rally points are alternative RTL points. Items are MAV_CMD_NAV_RALLY_POINT rally point items."]
2766    MAV_MISSION_TYPE_RALLY = 2,
2767    #[doc = "Only used in MISSION_CLEAR_ALL to clear all mission types."]
2768    MAV_MISSION_TYPE_ALL = 255,
2769}
2770impl MavMissionType {
2771    pub const DEFAULT: Self = Self::MAV_MISSION_TYPE_MISSION;
2772}
2773impl Default for MavMissionType {
2774    fn default() -> Self {
2775        Self::DEFAULT
2776    }
2777}
2778#[cfg_attr(feature = "ts", derive(TS))]
2779#[cfg_attr(feature = "ts", ts(export))]
2780#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2781#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2782#[cfg_attr(feature = "serde", serde(tag = "type"))]
2783#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2784#[repr(u32)]
2785#[doc = "These defines are predefined OR-combined mode flags. There is no need to use values from this enum, but it                simplifies the use of the mode flags. Note that manual input is enabled in all modes as a safety override."]
2786pub enum MavMode {
2787    #[doc = "System is not ready to fly, booting, calibrating, etc. No flag is set."]
2788    MAV_MODE_PREFLIGHT = 0,
2789    #[doc = "System is allowed to be active, under assisted RC control."]
2790    MAV_MODE_STABILIZE_DISARMED = 80,
2791    #[doc = "System is allowed to be active, under assisted RC control."]
2792    MAV_MODE_STABILIZE_ARMED = 208,
2793    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2794    MAV_MODE_MANUAL_DISARMED = 64,
2795    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2796    MAV_MODE_MANUAL_ARMED = 192,
2797    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2798    MAV_MODE_GUIDED_DISARMED = 88,
2799    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2800    MAV_MODE_GUIDED_ARMED = 216,
2801    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2802    MAV_MODE_AUTO_DISARMED = 92,
2803    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2804    MAV_MODE_AUTO_ARMED = 220,
2805    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2806    MAV_MODE_TEST_DISARMED = 66,
2807    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2808    MAV_MODE_TEST_ARMED = 194,
2809}
2810impl MavMode {
2811    pub const DEFAULT: Self = Self::MAV_MODE_PREFLIGHT;
2812}
2813impl Default for MavMode {
2814    fn default() -> Self {
2815        Self::DEFAULT
2816    }
2817}
2818bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags encode the MAV mode."] pub struct MavModeFlag : u8 { # [doc = "0b10000000 MAV safety set to armed. Motors are enabled / running / can start. Ready to fly. Additional note: this flag is to be ignore when sent in the command MAV_CMD_DO_SET_MODE and MAV_CMD_COMPONENT_ARM_DISARM shall be used instead. The flag can still be used to report the armed state."] const MAV_MODE_FLAG_SAFETY_ARMED = 128 ; # [doc = "0b01000000 remote control input is enabled."] const MAV_MODE_FLAG_MANUAL_INPUT_ENABLED = 64 ; # [doc = "0b00100000 hardware in the loop simulation. All motors / actuators are blocked, but internal software is full operational."] const MAV_MODE_FLAG_HIL_ENABLED = 32 ; # [doc = "0b00010000 system stabilizes electronically its attitude (and optionally position). It needs however further control inputs to move around."] const MAV_MODE_FLAG_STABILIZE_ENABLED = 16 ; # [doc = "0b00001000 guided mode enabled, system flies waypoints / mission items."] const MAV_MODE_FLAG_GUIDED_ENABLED = 8 ; # [doc = "0b00000100 autonomous mode enabled, system finds its own goal positions. Guided flag can be set or not, depends on the actual implementation."] const MAV_MODE_FLAG_AUTO_ENABLED = 4 ; # [doc = "0b00000010 system has a test mode enabled. This flag is intended for temporary system tests and should not be used for stable implementations."] const MAV_MODE_FLAG_TEST_ENABLED = 2 ; # [doc = "0b00000001 Reserved for future use."] const MAV_MODE_FLAG_CUSTOM_MODE_ENABLED = 1 ; } }
2819impl MavModeFlag {
2820    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_SAFETY_ARMED;
2821}
2822impl Default for MavModeFlag {
2823    fn default() -> Self {
2824        Self::DEFAULT
2825    }
2826}
2827#[cfg_attr(feature = "ts", derive(TS))]
2828#[cfg_attr(feature = "ts", ts(export))]
2829#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2830#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2831#[cfg_attr(feature = "serde", serde(tag = "type"))]
2832#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2833#[repr(u32)]
2834#[doc = "These values encode the bit positions of the decode position. These values can be used to read the value of a flag bit by combining the base_mode variable with AND with the flag position value. The result will be either 0 or 1, depending on if the flag is set or not."]
2835pub enum MavModeFlagDecodePosition {
2836    #[doc = "First bit:  10000000"]
2837    MAV_MODE_FLAG_DECODE_POSITION_SAFETY = 128,
2838    #[doc = "Second bit: 01000000"]
2839    MAV_MODE_FLAG_DECODE_POSITION_MANUAL = 64,
2840    #[doc = "Third bit:  00100000"]
2841    MAV_MODE_FLAG_DECODE_POSITION_HIL = 32,
2842    #[doc = "Fourth bit: 00010000"]
2843    MAV_MODE_FLAG_DECODE_POSITION_STABILIZE = 16,
2844    #[doc = "Fifth bit:  00001000"]
2845    MAV_MODE_FLAG_DECODE_POSITION_GUIDED = 8,
2846    #[doc = "Sixth bit:   00000100"]
2847    MAV_MODE_FLAG_DECODE_POSITION_AUTO = 4,
2848    #[doc = "Seventh bit: 00000010"]
2849    MAV_MODE_FLAG_DECODE_POSITION_TEST = 2,
2850    #[doc = "Eighth bit: 00000001"]
2851    MAV_MODE_FLAG_DECODE_POSITION_CUSTOM_MODE = 1,
2852}
2853impl MavModeFlagDecodePosition {
2854    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_DECODE_POSITION_SAFETY;
2855}
2856impl Default for MavModeFlagDecodePosition {
2857    fn default() -> Self {
2858        Self::DEFAULT
2859    }
2860}
2861bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Mode properties."] pub struct MavModeProperty : u32 { # [doc = "If set, this mode is an advanced mode.           For example a rate-controlled manual mode might be advanced, whereas a position-controlled manual mode is not.           A GCS can optionally use this flag to configure the UI for its intended users."] const MAV_MODE_PROPERTY_ADVANCED = 1 ; # [doc = "If set, this mode should not be added to the list of selectable modes.           The mode might still be selected by the FC directly (for example as part of a failsafe)."] const MAV_MODE_PROPERTY_NOT_USER_SELECTABLE = 2 ; # [doc = "If set, this mode is automatically controlled (it may use but does not require a manual controller).           If unset the mode is a assumed to require user input (be a manual mode)."] const MAV_MODE_PROPERTY_AUTO_MODE = 4 ; } }
2862impl MavModeProperty {
2863    pub const DEFAULT: Self = Self::MAV_MODE_PROPERTY_ADVANCED;
2864}
2865impl Default for MavModeProperty {
2866    fn default() -> Self {
2867        Self::DEFAULT
2868    }
2869}
2870#[cfg_attr(feature = "ts", derive(TS))]
2871#[cfg_attr(feature = "ts", ts(export))]
2872#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2873#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2874#[cfg_attr(feature = "serde", serde(tag = "type"))]
2875#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2876#[repr(u32)]
2877#[deprecated = " See `GIMBAL_MANAGER_FLAGS` (Deprecated since 2020-01)"]
2878#[doc = "Enumeration of possible mount operation modes. This message is used by obsolete/deprecated gimbal messages."]
2879pub enum MavMountMode {
2880    #[doc = "Load and keep safe position (Roll,Pitch,Yaw) from permanent memory and stop stabilization"]
2881    MAV_MOUNT_MODE_RETRACT = 0,
2882    #[doc = "Load and keep neutral position (Roll,Pitch,Yaw) from permanent memory."]
2883    MAV_MOUNT_MODE_NEUTRAL = 1,
2884    #[doc = "Load neutral position and start MAVLink Roll,Pitch,Yaw control with stabilization"]
2885    MAV_MOUNT_MODE_MAVLINK_TARGETING = 2,
2886    #[doc = "Load neutral position and start RC Roll,Pitch,Yaw control with stabilization"]
2887    MAV_MOUNT_MODE_RC_TARGETING = 3,
2888    #[doc = "Load neutral position and start to point to Lat,Lon,Alt"]
2889    MAV_MOUNT_MODE_GPS_POINT = 4,
2890    #[doc = "Gimbal tracks system with specified system ID"]
2891    MAV_MOUNT_MODE_SYSID_TARGET = 5,
2892    #[doc = "Gimbal tracks home position"]
2893    MAV_MOUNT_MODE_HOME_LOCATION = 6,
2894}
2895impl MavMountMode {
2896    pub const DEFAULT: Self = Self::MAV_MOUNT_MODE_RETRACT;
2897}
2898impl Default for MavMountMode {
2899    fn default() -> Self {
2900        Self::DEFAULT
2901    }
2902}
2903#[cfg_attr(feature = "ts", derive(TS))]
2904#[cfg_attr(feature = "ts", ts(export))]
2905#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2906#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2907#[cfg_attr(feature = "serde", serde(tag = "type"))]
2908#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2909#[repr(u32)]
2910pub enum MavOdidArmStatus {
2911    #[doc = "Passing arming checks."]
2912    MAV_ODID_ARM_STATUS_GOOD_TO_ARM = 0,
2913    #[doc = "Generic arming failure, see error string for details."]
2914    MAV_ODID_ARM_STATUS_PRE_ARM_FAIL_GENERIC = 1,
2915}
2916impl MavOdidArmStatus {
2917    pub const DEFAULT: Self = Self::MAV_ODID_ARM_STATUS_GOOD_TO_ARM;
2918}
2919impl Default for MavOdidArmStatus {
2920    fn default() -> Self {
2921        Self::DEFAULT
2922    }
2923}
2924#[cfg_attr(feature = "ts", derive(TS))]
2925#[cfg_attr(feature = "ts", ts(export))]
2926#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2927#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2928#[cfg_attr(feature = "serde", serde(tag = "type"))]
2929#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2930#[repr(u32)]
2931pub enum MavOdidAuthType {
2932    #[doc = "No authentication type is specified."]
2933    MAV_ODID_AUTH_TYPE_NONE = 0,
2934    #[doc = "Signature for the UAS (Unmanned Aircraft System) ID."]
2935    MAV_ODID_AUTH_TYPE_UAS_ID_SIGNATURE = 1,
2936    #[doc = "Signature for the Operator ID."]
2937    MAV_ODID_AUTH_TYPE_OPERATOR_ID_SIGNATURE = 2,
2938    #[doc = "Signature for the entire message set."]
2939    MAV_ODID_AUTH_TYPE_MESSAGE_SET_SIGNATURE = 3,
2940    #[doc = "Authentication is provided by Network Remote ID."]
2941    MAV_ODID_AUTH_TYPE_NETWORK_REMOTE_ID = 4,
2942    #[doc = "The exact authentication type is indicated by the first byte of authentication_data and these type values are managed by ICAO."]
2943    MAV_ODID_AUTH_TYPE_SPECIFIC_AUTHENTICATION = 5,
2944}
2945impl MavOdidAuthType {
2946    pub const DEFAULT: Self = Self::MAV_ODID_AUTH_TYPE_NONE;
2947}
2948impl Default for MavOdidAuthType {
2949    fn default() -> Self {
2950        Self::DEFAULT
2951    }
2952}
2953#[cfg_attr(feature = "ts", derive(TS))]
2954#[cfg_attr(feature = "ts", ts(export))]
2955#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2956#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2957#[cfg_attr(feature = "serde", serde(tag = "type"))]
2958#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2959#[repr(u32)]
2960pub enum MavOdidCategoryEu {
2961    #[doc = "The category for the UA, according to the EU specification, is undeclared."]
2962    MAV_ODID_CATEGORY_EU_UNDECLARED = 0,
2963    #[doc = "The category for the UA, according to the EU specification, is the Open category."]
2964    MAV_ODID_CATEGORY_EU_OPEN = 1,
2965    #[doc = "The category for the UA, according to the EU specification, is the Specific category."]
2966    MAV_ODID_CATEGORY_EU_SPECIFIC = 2,
2967    #[doc = "The category for the UA, according to the EU specification, is the Certified category."]
2968    MAV_ODID_CATEGORY_EU_CERTIFIED = 3,
2969}
2970impl MavOdidCategoryEu {
2971    pub const DEFAULT: Self = Self::MAV_ODID_CATEGORY_EU_UNDECLARED;
2972}
2973impl Default for MavOdidCategoryEu {
2974    fn default() -> Self {
2975        Self::DEFAULT
2976    }
2977}
2978#[cfg_attr(feature = "ts", derive(TS))]
2979#[cfg_attr(feature = "ts", ts(export))]
2980#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2981#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2982#[cfg_attr(feature = "serde", serde(tag = "type"))]
2983#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2984#[repr(u32)]
2985pub enum MavOdidClassEu {
2986    #[doc = "The class for the UA, according to the EU specification, is undeclared."]
2987    MAV_ODID_CLASS_EU_UNDECLARED = 0,
2988    #[doc = "The class for the UA, according to the EU specification, is Class 0."]
2989    MAV_ODID_CLASS_EU_CLASS_0 = 1,
2990    #[doc = "The class for the UA, according to the EU specification, is Class 1."]
2991    MAV_ODID_CLASS_EU_CLASS_1 = 2,
2992    #[doc = "The class for the UA, according to the EU specification, is Class 2."]
2993    MAV_ODID_CLASS_EU_CLASS_2 = 3,
2994    #[doc = "The class for the UA, according to the EU specification, is Class 3."]
2995    MAV_ODID_CLASS_EU_CLASS_3 = 4,
2996    #[doc = "The class for the UA, according to the EU specification, is Class 4."]
2997    MAV_ODID_CLASS_EU_CLASS_4 = 5,
2998    #[doc = "The class for the UA, according to the EU specification, is Class 5."]
2999    MAV_ODID_CLASS_EU_CLASS_5 = 6,
3000    #[doc = "The class for the UA, according to the EU specification, is Class 6."]
3001    MAV_ODID_CLASS_EU_CLASS_6 = 7,
3002}
3003impl MavOdidClassEu {
3004    pub const DEFAULT: Self = Self::MAV_ODID_CLASS_EU_UNDECLARED;
3005}
3006impl Default for MavOdidClassEu {
3007    fn default() -> Self {
3008        Self::DEFAULT
3009    }
3010}
3011#[cfg_attr(feature = "ts", derive(TS))]
3012#[cfg_attr(feature = "ts", ts(export))]
3013#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3014#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3015#[cfg_attr(feature = "serde", serde(tag = "type"))]
3016#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3017#[repr(u32)]
3018pub enum MavOdidClassificationType {
3019    #[doc = "The classification type for the UA is undeclared."]
3020    MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED = 0,
3021    #[doc = "The classification type for the UA follows EU (European Union) specifications."]
3022    MAV_ODID_CLASSIFICATION_TYPE_EU = 1,
3023}
3024impl MavOdidClassificationType {
3025    pub const DEFAULT: Self = Self::MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED;
3026}
3027impl Default for MavOdidClassificationType {
3028    fn default() -> Self {
3029        Self::DEFAULT
3030    }
3031}
3032#[cfg_attr(feature = "ts", derive(TS))]
3033#[cfg_attr(feature = "ts", ts(export))]
3034#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3035#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3036#[cfg_attr(feature = "serde", serde(tag = "type"))]
3037#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3038#[repr(u32)]
3039pub enum MavOdidDescType {
3040    #[doc = "Optional free-form text description of the purpose of the flight."]
3041    MAV_ODID_DESC_TYPE_TEXT = 0,
3042    #[doc = "Optional additional clarification when status == MAV_ODID_STATUS_EMERGENCY."]
3043    MAV_ODID_DESC_TYPE_EMERGENCY = 1,
3044    #[doc = "Optional additional clarification when status != MAV_ODID_STATUS_EMERGENCY."]
3045    MAV_ODID_DESC_TYPE_EXTENDED_STATUS = 2,
3046}
3047impl MavOdidDescType {
3048    pub const DEFAULT: Self = Self::MAV_ODID_DESC_TYPE_TEXT;
3049}
3050impl Default for MavOdidDescType {
3051    fn default() -> Self {
3052        Self::DEFAULT
3053    }
3054}
3055#[cfg_attr(feature = "ts", derive(TS))]
3056#[cfg_attr(feature = "ts", ts(export))]
3057#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3058#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3059#[cfg_attr(feature = "serde", serde(tag = "type"))]
3060#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3061#[repr(u32)]
3062pub enum MavOdidHeightRef {
3063    #[doc = "The height field is relative to the take-off location."]
3064    MAV_ODID_HEIGHT_REF_OVER_TAKEOFF = 0,
3065    #[doc = "The height field is relative to ground."]
3066    MAV_ODID_HEIGHT_REF_OVER_GROUND = 1,
3067}
3068impl MavOdidHeightRef {
3069    pub const DEFAULT: Self = Self::MAV_ODID_HEIGHT_REF_OVER_TAKEOFF;
3070}
3071impl Default for MavOdidHeightRef {
3072    fn default() -> Self {
3073        Self::DEFAULT
3074    }
3075}
3076#[cfg_attr(feature = "ts", derive(TS))]
3077#[cfg_attr(feature = "ts", ts(export))]
3078#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3079#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3080#[cfg_attr(feature = "serde", serde(tag = "type"))]
3081#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3082#[repr(u32)]
3083pub enum MavOdidHorAcc {
3084    #[doc = "The horizontal accuracy is unknown."]
3085    MAV_ODID_HOR_ACC_UNKNOWN = 0,
3086    #[doc = "The horizontal accuracy is smaller than 10 Nautical Miles. 18.52 km."]
3087    MAV_ODID_HOR_ACC_10NM = 1,
3088    #[doc = "The horizontal accuracy is smaller than 4 Nautical Miles. 7.408 km."]
3089    MAV_ODID_HOR_ACC_4NM = 2,
3090    #[doc = "The horizontal accuracy is smaller than 2 Nautical Miles. 3.704 km."]
3091    MAV_ODID_HOR_ACC_2NM = 3,
3092    #[doc = "The horizontal accuracy is smaller than 1 Nautical Miles. 1.852 km."]
3093    MAV_ODID_HOR_ACC_1NM = 4,
3094    #[doc = "The horizontal accuracy is smaller than 0.5 Nautical Miles. 926 m."]
3095    MAV_ODID_HOR_ACC_0_5NM = 5,
3096    #[doc = "The horizontal accuracy is smaller than 0.3 Nautical Miles. 555.6 m."]
3097    MAV_ODID_HOR_ACC_0_3NM = 6,
3098    #[doc = "The horizontal accuracy is smaller than 0.1 Nautical Miles. 185.2 m."]
3099    MAV_ODID_HOR_ACC_0_1NM = 7,
3100    #[doc = "The horizontal accuracy is smaller than 0.05 Nautical Miles. 92.6 m."]
3101    MAV_ODID_HOR_ACC_0_05NM = 8,
3102    #[doc = "The horizontal accuracy is smaller than 30 meter."]
3103    MAV_ODID_HOR_ACC_30_METER = 9,
3104    #[doc = "The horizontal accuracy is smaller than 10 meter."]
3105    MAV_ODID_HOR_ACC_10_METER = 10,
3106    #[doc = "The horizontal accuracy is smaller than 3 meter."]
3107    MAV_ODID_HOR_ACC_3_METER = 11,
3108    #[doc = "The horizontal accuracy is smaller than 1 meter."]
3109    MAV_ODID_HOR_ACC_1_METER = 12,
3110}
3111impl MavOdidHorAcc {
3112    pub const DEFAULT: Self = Self::MAV_ODID_HOR_ACC_UNKNOWN;
3113}
3114impl Default for MavOdidHorAcc {
3115    fn default() -> Self {
3116        Self::DEFAULT
3117    }
3118}
3119#[cfg_attr(feature = "ts", derive(TS))]
3120#[cfg_attr(feature = "ts", ts(export))]
3121#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3122#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3123#[cfg_attr(feature = "serde", serde(tag = "type"))]
3124#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3125#[repr(u32)]
3126pub enum MavOdidIdType {
3127    #[doc = "No type defined."]
3128    MAV_ODID_ID_TYPE_NONE = 0,
3129    #[doc = "Manufacturer Serial Number (ANSI/CTA-2063 format)."]
3130    MAV_ODID_ID_TYPE_SERIAL_NUMBER = 1,
3131    #[doc = "CAA (Civil Aviation Authority) registered ID. Format: [ICAO Country Code].[CAA Assigned ID]."]
3132    MAV_ODID_ID_TYPE_CAA_REGISTRATION_ID = 2,
3133    #[doc = "UTM (Unmanned Traffic Management) assigned UUID (RFC4122)."]
3134    MAV_ODID_ID_TYPE_UTM_ASSIGNED_UUID = 3,
3135    #[doc = "A 20 byte ID for a specific flight/session. The exact ID type is indicated by the first byte of uas_id and these type values are managed by ICAO."]
3136    MAV_ODID_ID_TYPE_SPECIFIC_SESSION_ID = 4,
3137}
3138impl MavOdidIdType {
3139    pub const DEFAULT: Self = Self::MAV_ODID_ID_TYPE_NONE;
3140}
3141impl Default for MavOdidIdType {
3142    fn default() -> Self {
3143        Self::DEFAULT
3144    }
3145}
3146#[cfg_attr(feature = "ts", derive(TS))]
3147#[cfg_attr(feature = "ts", ts(export))]
3148#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3149#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3150#[cfg_attr(feature = "serde", serde(tag = "type"))]
3151#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3152#[repr(u32)]
3153pub enum MavOdidOperatorIdType {
3154    #[doc = "CAA (Civil Aviation Authority) registered operator ID."]
3155    MAV_ODID_OPERATOR_ID_TYPE_CAA = 0,
3156}
3157impl MavOdidOperatorIdType {
3158    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_ID_TYPE_CAA;
3159}
3160impl Default for MavOdidOperatorIdType {
3161    fn default() -> Self {
3162        Self::DEFAULT
3163    }
3164}
3165#[cfg_attr(feature = "ts", derive(TS))]
3166#[cfg_attr(feature = "ts", ts(export))]
3167#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3168#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3169#[cfg_attr(feature = "serde", serde(tag = "type"))]
3170#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3171#[repr(u32)]
3172pub enum MavOdidOperatorLocationType {
3173    #[doc = "The location/altitude of the operator is the same as the take-off location."]
3174    MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF = 0,
3175    #[doc = "The location/altitude of the operator is dynamic. E.g. based on live GNSS data."]
3176    MAV_ODID_OPERATOR_LOCATION_TYPE_LIVE_GNSS = 1,
3177    #[doc = "The location/altitude of the operator are fixed values."]
3178    MAV_ODID_OPERATOR_LOCATION_TYPE_FIXED = 2,
3179}
3180impl MavOdidOperatorLocationType {
3181    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF;
3182}
3183impl Default for MavOdidOperatorLocationType {
3184    fn default() -> Self {
3185        Self::DEFAULT
3186    }
3187}
3188#[cfg_attr(feature = "ts", derive(TS))]
3189#[cfg_attr(feature = "ts", ts(export))]
3190#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3191#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3192#[cfg_attr(feature = "serde", serde(tag = "type"))]
3193#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3194#[repr(u32)]
3195pub enum MavOdidSpeedAcc {
3196    #[doc = "The speed accuracy is unknown."]
3197    MAV_ODID_SPEED_ACC_UNKNOWN = 0,
3198    #[doc = "The speed accuracy is smaller than 10 meters per second."]
3199    MAV_ODID_SPEED_ACC_10_METERS_PER_SECOND = 1,
3200    #[doc = "The speed accuracy is smaller than 3 meters per second."]
3201    MAV_ODID_SPEED_ACC_3_METERS_PER_SECOND = 2,
3202    #[doc = "The speed accuracy is smaller than 1 meters per second."]
3203    MAV_ODID_SPEED_ACC_1_METERS_PER_SECOND = 3,
3204    #[doc = "The speed accuracy is smaller than 0.3 meters per second."]
3205    MAV_ODID_SPEED_ACC_0_3_METERS_PER_SECOND = 4,
3206}
3207impl MavOdidSpeedAcc {
3208    pub const DEFAULT: Self = Self::MAV_ODID_SPEED_ACC_UNKNOWN;
3209}
3210impl Default for MavOdidSpeedAcc {
3211    fn default() -> Self {
3212        Self::DEFAULT
3213    }
3214}
3215#[cfg_attr(feature = "ts", derive(TS))]
3216#[cfg_attr(feature = "ts", ts(export))]
3217#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3218#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3219#[cfg_attr(feature = "serde", serde(tag = "type"))]
3220#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3221#[repr(u32)]
3222pub enum MavOdidStatus {
3223    #[doc = "The status of the (UA) Unmanned Aircraft is undefined."]
3224    MAV_ODID_STATUS_UNDECLARED = 0,
3225    #[doc = "The UA is on the ground."]
3226    MAV_ODID_STATUS_GROUND = 1,
3227    #[doc = "The UA is in the air."]
3228    MAV_ODID_STATUS_AIRBORNE = 2,
3229    #[doc = "The UA is having an emergency."]
3230    MAV_ODID_STATUS_EMERGENCY = 3,
3231    #[doc = "The remote ID system is failing or unreliable in some way."]
3232    MAV_ODID_STATUS_REMOTE_ID_SYSTEM_FAILURE = 4,
3233}
3234impl MavOdidStatus {
3235    pub const DEFAULT: Self = Self::MAV_ODID_STATUS_UNDECLARED;
3236}
3237impl Default for MavOdidStatus {
3238    fn default() -> Self {
3239        Self::DEFAULT
3240    }
3241}
3242#[cfg_attr(feature = "ts", derive(TS))]
3243#[cfg_attr(feature = "ts", ts(export))]
3244#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3245#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3246#[cfg_attr(feature = "serde", serde(tag = "type"))]
3247#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3248#[repr(u32)]
3249pub enum MavOdidTimeAcc {
3250    #[doc = "The timestamp accuracy is unknown."]
3251    MAV_ODID_TIME_ACC_UNKNOWN = 0,
3252    #[doc = "The timestamp accuracy is smaller than or equal to 0.1 second."]
3253    MAV_ODID_TIME_ACC_0_1_SECOND = 1,
3254    #[doc = "The timestamp accuracy is smaller than or equal to 0.2 second."]
3255    MAV_ODID_TIME_ACC_0_2_SECOND = 2,
3256    #[doc = "The timestamp accuracy is smaller than or equal to 0.3 second."]
3257    MAV_ODID_TIME_ACC_0_3_SECOND = 3,
3258    #[doc = "The timestamp accuracy is smaller than or equal to 0.4 second."]
3259    MAV_ODID_TIME_ACC_0_4_SECOND = 4,
3260    #[doc = "The timestamp accuracy is smaller than or equal to 0.5 second."]
3261    MAV_ODID_TIME_ACC_0_5_SECOND = 5,
3262    #[doc = "The timestamp accuracy is smaller than or equal to 0.6 second."]
3263    MAV_ODID_TIME_ACC_0_6_SECOND = 6,
3264    #[doc = "The timestamp accuracy is smaller than or equal to 0.7 second."]
3265    MAV_ODID_TIME_ACC_0_7_SECOND = 7,
3266    #[doc = "The timestamp accuracy is smaller than or equal to 0.8 second."]
3267    MAV_ODID_TIME_ACC_0_8_SECOND = 8,
3268    #[doc = "The timestamp accuracy is smaller than or equal to 0.9 second."]
3269    MAV_ODID_TIME_ACC_0_9_SECOND = 9,
3270    #[doc = "The timestamp accuracy is smaller than or equal to 1.0 second."]
3271    MAV_ODID_TIME_ACC_1_0_SECOND = 10,
3272    #[doc = "The timestamp accuracy is smaller than or equal to 1.1 second."]
3273    MAV_ODID_TIME_ACC_1_1_SECOND = 11,
3274    #[doc = "The timestamp accuracy is smaller than or equal to 1.2 second."]
3275    MAV_ODID_TIME_ACC_1_2_SECOND = 12,
3276    #[doc = "The timestamp accuracy is smaller than or equal to 1.3 second."]
3277    MAV_ODID_TIME_ACC_1_3_SECOND = 13,
3278    #[doc = "The timestamp accuracy is smaller than or equal to 1.4 second."]
3279    MAV_ODID_TIME_ACC_1_4_SECOND = 14,
3280    #[doc = "The timestamp accuracy is smaller than or equal to 1.5 second."]
3281    MAV_ODID_TIME_ACC_1_5_SECOND = 15,
3282}
3283impl MavOdidTimeAcc {
3284    pub const DEFAULT: Self = Self::MAV_ODID_TIME_ACC_UNKNOWN;
3285}
3286impl Default for MavOdidTimeAcc {
3287    fn default() -> Self {
3288        Self::DEFAULT
3289    }
3290}
3291#[cfg_attr(feature = "ts", derive(TS))]
3292#[cfg_attr(feature = "ts", ts(export))]
3293#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3294#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3295#[cfg_attr(feature = "serde", serde(tag = "type"))]
3296#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3297#[repr(u32)]
3298pub enum MavOdidUaType {
3299    #[doc = "No UA (Unmanned Aircraft) type defined."]
3300    MAV_ODID_UA_TYPE_NONE = 0,
3301    #[doc = "Aeroplane/Airplane. Fixed wing."]
3302    MAV_ODID_UA_TYPE_AEROPLANE = 1,
3303    #[doc = "Helicopter or multirotor."]
3304    MAV_ODID_UA_TYPE_HELICOPTER_OR_MULTIROTOR = 2,
3305    #[doc = "Gyroplane."]
3306    MAV_ODID_UA_TYPE_GYROPLANE = 3,
3307    #[doc = "VTOL (Vertical Take-Off and Landing). Fixed wing aircraft that can take off vertically."]
3308    MAV_ODID_UA_TYPE_HYBRID_LIFT = 4,
3309    #[doc = "Ornithopter."]
3310    MAV_ODID_UA_TYPE_ORNITHOPTER = 5,
3311    #[doc = "Glider."]
3312    MAV_ODID_UA_TYPE_GLIDER = 6,
3313    #[doc = "Kite."]
3314    MAV_ODID_UA_TYPE_KITE = 7,
3315    #[doc = "Free Balloon."]
3316    MAV_ODID_UA_TYPE_FREE_BALLOON = 8,
3317    #[doc = "Captive Balloon."]
3318    MAV_ODID_UA_TYPE_CAPTIVE_BALLOON = 9,
3319    #[doc = "Airship. E.g. a blimp."]
3320    MAV_ODID_UA_TYPE_AIRSHIP = 10,
3321    #[doc = "Free Fall/Parachute (unpowered)."]
3322    MAV_ODID_UA_TYPE_FREE_FALL_PARACHUTE = 11,
3323    #[doc = "Rocket."]
3324    MAV_ODID_UA_TYPE_ROCKET = 12,
3325    #[doc = "Tethered powered aircraft."]
3326    MAV_ODID_UA_TYPE_TETHERED_POWERED_AIRCRAFT = 13,
3327    #[doc = "Ground Obstacle."]
3328    MAV_ODID_UA_TYPE_GROUND_OBSTACLE = 14,
3329    #[doc = "Other type of aircraft not listed earlier."]
3330    MAV_ODID_UA_TYPE_OTHER = 15,
3331}
3332impl MavOdidUaType {
3333    pub const DEFAULT: Self = Self::MAV_ODID_UA_TYPE_NONE;
3334}
3335impl Default for MavOdidUaType {
3336    fn default() -> Self {
3337        Self::DEFAULT
3338    }
3339}
3340#[cfg_attr(feature = "ts", derive(TS))]
3341#[cfg_attr(feature = "ts", ts(export))]
3342#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3343#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3344#[cfg_attr(feature = "serde", serde(tag = "type"))]
3345#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3346#[repr(u32)]
3347pub enum MavOdidVerAcc {
3348    #[doc = "The vertical accuracy is unknown."]
3349    MAV_ODID_VER_ACC_UNKNOWN = 0,
3350    #[doc = "The vertical accuracy is smaller than 150 meter."]
3351    MAV_ODID_VER_ACC_150_METER = 1,
3352    #[doc = "The vertical accuracy is smaller than 45 meter."]
3353    MAV_ODID_VER_ACC_45_METER = 2,
3354    #[doc = "The vertical accuracy is smaller than 25 meter."]
3355    MAV_ODID_VER_ACC_25_METER = 3,
3356    #[doc = "The vertical accuracy is smaller than 10 meter."]
3357    MAV_ODID_VER_ACC_10_METER = 4,
3358    #[doc = "The vertical accuracy is smaller than 3 meter."]
3359    MAV_ODID_VER_ACC_3_METER = 5,
3360    #[doc = "The vertical accuracy is smaller than 1 meter."]
3361    MAV_ODID_VER_ACC_1_METER = 6,
3362}
3363impl MavOdidVerAcc {
3364    pub const DEFAULT: Self = Self::MAV_ODID_VER_ACC_UNKNOWN;
3365}
3366impl Default for MavOdidVerAcc {
3367    fn default() -> Self {
3368        Self::DEFAULT
3369    }
3370}
3371#[cfg_attr(feature = "ts", derive(TS))]
3372#[cfg_attr(feature = "ts", ts(export))]
3373#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3374#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3375#[cfg_attr(feature = "serde", serde(tag = "type"))]
3376#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3377#[repr(u32)]
3378#[doc = "Specifies the datatype of a MAVLink extended parameter."]
3379pub enum MavParamExtType {
3380    #[doc = "8-bit unsigned integer"]
3381    MAV_PARAM_EXT_TYPE_UINT8 = 1,
3382    #[doc = "8-bit signed integer"]
3383    MAV_PARAM_EXT_TYPE_INT8 = 2,
3384    #[doc = "16-bit unsigned integer"]
3385    MAV_PARAM_EXT_TYPE_UINT16 = 3,
3386    #[doc = "16-bit signed integer"]
3387    MAV_PARAM_EXT_TYPE_INT16 = 4,
3388    #[doc = "32-bit unsigned integer"]
3389    MAV_PARAM_EXT_TYPE_UINT32 = 5,
3390    #[doc = "32-bit signed integer"]
3391    MAV_PARAM_EXT_TYPE_INT32 = 6,
3392    #[doc = "64-bit unsigned integer"]
3393    MAV_PARAM_EXT_TYPE_UINT64 = 7,
3394    #[doc = "64-bit signed integer"]
3395    MAV_PARAM_EXT_TYPE_INT64 = 8,
3396    #[doc = "32-bit floating-point"]
3397    MAV_PARAM_EXT_TYPE_REAL32 = 9,
3398    #[doc = "64-bit floating-point"]
3399    MAV_PARAM_EXT_TYPE_REAL64 = 10,
3400    #[doc = "Custom Type"]
3401    MAV_PARAM_EXT_TYPE_CUSTOM = 11,
3402}
3403impl MavParamExtType {
3404    pub const DEFAULT: Self = Self::MAV_PARAM_EXT_TYPE_UINT8;
3405}
3406impl Default for MavParamExtType {
3407    fn default() -> Self {
3408        Self::DEFAULT
3409    }
3410}
3411#[cfg_attr(feature = "ts", derive(TS))]
3412#[cfg_attr(feature = "ts", ts(export))]
3413#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3414#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3415#[cfg_attr(feature = "serde", serde(tag = "type"))]
3416#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3417#[repr(u32)]
3418#[doc = "Specifies the datatype of a MAVLink parameter."]
3419pub enum MavParamType {
3420    #[doc = "8-bit unsigned integer"]
3421    MAV_PARAM_TYPE_UINT8 = 1,
3422    #[doc = "8-bit signed integer"]
3423    MAV_PARAM_TYPE_INT8 = 2,
3424    #[doc = "16-bit unsigned integer"]
3425    MAV_PARAM_TYPE_UINT16 = 3,
3426    #[doc = "16-bit signed integer"]
3427    MAV_PARAM_TYPE_INT16 = 4,
3428    #[doc = "32-bit unsigned integer"]
3429    MAV_PARAM_TYPE_UINT32 = 5,
3430    #[doc = "32-bit signed integer"]
3431    MAV_PARAM_TYPE_INT32 = 6,
3432    #[doc = "64-bit unsigned integer"]
3433    MAV_PARAM_TYPE_UINT64 = 7,
3434    #[doc = "64-bit signed integer"]
3435    MAV_PARAM_TYPE_INT64 = 8,
3436    #[doc = "32-bit floating-point"]
3437    MAV_PARAM_TYPE_REAL32 = 9,
3438    #[doc = "64-bit floating-point"]
3439    MAV_PARAM_TYPE_REAL64 = 10,
3440}
3441impl MavParamType {
3442    pub const DEFAULT: Self = Self::MAV_PARAM_TYPE_UINT8;
3443}
3444impl Default for MavParamType {
3445    fn default() -> Self {
3446        Self::DEFAULT
3447    }
3448}
3449bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Power supply status flags (bitmask)"] pub struct MavPowerStatus : u16 { # [doc = "main brick power supply valid"] const MAV_POWER_STATUS_BRICK_VALID = 1 ; # [doc = "main servo power supply valid for FMU"] const MAV_POWER_STATUS_SERVO_VALID = 2 ; # [doc = "USB power is connected"] const MAV_POWER_STATUS_USB_CONNECTED = 4 ; # [doc = "peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_OVERCURRENT = 8 ; # [doc = "hi-power peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_HIPOWER_OVERCURRENT = 16 ; # [doc = "Power status has changed since boot"] const MAV_POWER_STATUS_CHANGED = 32 ; } }
3450impl MavPowerStatus {
3451    pub const DEFAULT: Self = Self::MAV_POWER_STATUS_BRICK_VALID;
3452}
3453impl Default for MavPowerStatus {
3454    fn default() -> Self {
3455        Self::DEFAULT
3456    }
3457}
3458bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmask of (optional) autopilot capabilities (64 bit). If a bit is set, the autopilot supports this capability."] pub struct MavProtocolCapability : u64 { # [doc = "Autopilot supports the MISSION_ITEM float message type.           Note that MISSION_ITEM is deprecated, and autopilots should use MISSION_INT instead."] const MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT = 1 ; # [deprecated = " See `MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST` (Deprecated since 2022-03)"] # [doc = "Autopilot supports the new param float message type."] const MAV_PROTOCOL_CAPABILITY_PARAM_FLOAT = 2 ; # [doc = "Autopilot supports MISSION_ITEM_INT scaled integer message type.           Note that this flag must always be set if missions are supported, because missions must always use MISSION_ITEM_INT (rather than MISSION_ITEM, which is deprecated)."] const MAV_PROTOCOL_CAPABILITY_MISSION_INT = 4 ; # [doc = "Autopilot supports COMMAND_INT scaled integer message type."] const MAV_PROTOCOL_CAPABILITY_COMMAND_INT = 8 ; # [doc = "Parameter protocol uses byte-wise encoding of parameter values into param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE = 16 ; # [doc = "Autopilot supports the File Transfer Protocol v1: <https://mavlink.io/en/services/ftp.html>."] const MAV_PROTOCOL_CAPABILITY_FTP = 32 ; # [doc = "Autopilot supports commanding attitude offboard."] const MAV_PROTOCOL_CAPABILITY_SET_ATTITUDE_TARGET = 64 ; # [doc = "Autopilot supports commanding position and velocity targets in local NED frame."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_LOCAL_NED = 128 ; # [doc = "Autopilot supports commanding position and velocity targets in global scaled integers."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_GLOBAL_INT = 256 ; # [doc = "Autopilot supports terrain protocol / data handling."] const MAV_PROTOCOL_CAPABILITY_TERRAIN = 512 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED3 = 1024 ; # [doc = "Autopilot supports the MAV_CMD_DO_FLIGHTTERMINATION command (flight termination)."] const MAV_PROTOCOL_CAPABILITY_FLIGHT_TERMINATION = 2048 ; # [doc = "Autopilot supports onboard compass calibration."] const MAV_PROTOCOL_CAPABILITY_COMPASS_CALIBRATION = 4096 ; # [doc = "Autopilot supports MAVLink version 2."] const MAV_PROTOCOL_CAPABILITY_MAVLINK2 = 8192 ; # [doc = "Autopilot supports mission fence protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_FENCE = 16384 ; # [doc = "Autopilot supports mission rally point protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_RALLY = 32768 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED2 = 65536 ; # [doc = "Parameter protocol uses C-cast of parameter values to set the param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST = 131072 ; # [doc = "This component implements/is a gimbal manager. This means the GIMBAL_MANAGER_INFORMATION, and other messages can be requested."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_IMPLEMENTS_GIMBAL_MANAGER = 262144 ; # [doc = "Component supports locking control to a particular GCS independent of its system (via MAV_CMD_REQUEST_OPERATOR_CONTROL)."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_ACCEPTS_GCS_CONTROL = 524288 ; } }
3459impl MavProtocolCapability {
3460    pub const DEFAULT: Self = Self::MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT;
3461}
3462impl Default for MavProtocolCapability {
3463    fn default() -> Self {
3464        Self::DEFAULT
3465    }
3466}
3467#[cfg_attr(feature = "ts", derive(TS))]
3468#[cfg_attr(feature = "ts", ts(export))]
3469#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3470#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3471#[cfg_attr(feature = "serde", serde(tag = "type"))]
3472#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3473#[repr(u32)]
3474#[doc = "Result from a MAVLink command (MAV_CMD)"]
3475pub enum MavResult {
3476    #[doc = "Command is valid (is supported and has valid parameters), and was executed."]
3477    MAV_RESULT_ACCEPTED = 0,
3478    #[doc = "Command is valid, but cannot be executed at this time. This is used to indicate a problem that should be fixed just by waiting (e.g. a state machine is busy, can't arm because have not got GPS lock, etc.). Retrying later should work."]
3479    MAV_RESULT_TEMPORARILY_REJECTED = 1,
3480    #[doc = "Command is invalid (is supported but has invalid parameters). Retrying same command and parameters will not work."]
3481    MAV_RESULT_DENIED = 2,
3482    #[doc = "Command is not supported (unknown)."]
3483    MAV_RESULT_UNSUPPORTED = 3,
3484    #[doc = "Command is valid, but execution has failed. This is used to indicate any non-temporary or unexpected problem, i.e. any problem that must be fixed before the command can succeed/be retried. For example, attempting to write a file when out of memory, attempting to arm when sensors are not calibrated, etc."]
3485    MAV_RESULT_FAILED = 4,
3486    #[doc = "Command is valid and is being executed. This will be followed by further progress updates, i.e. the component may send further COMMAND_ACK messages with result MAV_RESULT_IN_PROGRESS (at a rate decided by the implementation), and must terminate by sending a COMMAND_ACK message with final result of the operation. The COMMAND_ACK.progress field can be used to indicate the progress of the operation."]
3487    MAV_RESULT_IN_PROGRESS = 5,
3488    #[doc = "Command has been cancelled (as a result of receiving a COMMAND_CANCEL message)."]
3489    MAV_RESULT_CANCELLED = 6,
3490    #[doc = "Command is only accepted when sent as a COMMAND_LONG."]
3491    MAV_RESULT_COMMAND_LONG_ONLY = 7,
3492    #[doc = "Command is only accepted when sent as a COMMAND_INT."]
3493    MAV_RESULT_COMMAND_INT_ONLY = 8,
3494    #[doc = "Command is invalid because a frame is required and the specified frame is not supported."]
3495    MAV_RESULT_COMMAND_UNSUPPORTED_MAV_FRAME = 9,
3496}
3497impl MavResult {
3498    pub const DEFAULT: Self = Self::MAV_RESULT_ACCEPTED;
3499}
3500impl Default for MavResult {
3501    fn default() -> Self {
3502        Self::DEFAULT
3503    }
3504}
3505#[cfg_attr(feature = "ts", derive(TS))]
3506#[cfg_attr(feature = "ts", ts(export))]
3507#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3508#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3509#[cfg_attr(feature = "serde", serde(tag = "type"))]
3510#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3511#[repr(u32)]
3512#[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
3513#[doc = "The ROI (region of interest) for the vehicle. This can be                 be used by the vehicle for camera/vehicle attitude alignment (see                 MAV_CMD_NAV_ROI)."]
3514pub enum MavRoi {
3515    #[doc = "No region of interest."]
3516    MAV_ROI_NONE = 0,
3517    #[doc = "Point toward next waypoint, with optional pitch/roll/yaw offset."]
3518    MAV_ROI_WPNEXT = 1,
3519    #[doc = "Point toward given waypoint."]
3520    MAV_ROI_WPINDEX = 2,
3521    #[doc = "Point toward fixed location."]
3522    MAV_ROI_LOCATION = 3,
3523    #[doc = "Point toward of given id."]
3524    MAV_ROI_TARGET = 4,
3525}
3526impl MavRoi {
3527    pub const DEFAULT: Self = Self::MAV_ROI_NONE;
3528}
3529impl Default for MavRoi {
3530    fn default() -> Self {
3531        Self::DEFAULT
3532    }
3533}
3534#[cfg_attr(feature = "ts", derive(TS))]
3535#[cfg_attr(feature = "ts", ts(export))]
3536#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3537#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3538#[cfg_attr(feature = "serde", serde(tag = "type"))]
3539#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3540#[repr(u32)]
3541#[doc = "Enumeration of sensor orientation, according to its rotations"]
3542pub enum MavSensorOrientation {
3543    #[doc = "Roll: 0, Pitch: 0, Yaw: 0"]
3544    MAV_SENSOR_ROTATION_NONE = 0,
3545    #[doc = "Roll: 0, Pitch: 0, Yaw: 45"]
3546    MAV_SENSOR_ROTATION_YAW_45 = 1,
3547    #[doc = "Roll: 0, Pitch: 0, Yaw: 90"]
3548    MAV_SENSOR_ROTATION_YAW_90 = 2,
3549    #[doc = "Roll: 0, Pitch: 0, Yaw: 135"]
3550    MAV_SENSOR_ROTATION_YAW_135 = 3,
3551    #[doc = "Roll: 0, Pitch: 0, Yaw: 180"]
3552    MAV_SENSOR_ROTATION_YAW_180 = 4,
3553    #[doc = "Roll: 0, Pitch: 0, Yaw: 225"]
3554    MAV_SENSOR_ROTATION_YAW_225 = 5,
3555    #[doc = "Roll: 0, Pitch: 0, Yaw: 270"]
3556    MAV_SENSOR_ROTATION_YAW_270 = 6,
3557    #[doc = "Roll: 0, Pitch: 0, Yaw: 315"]
3558    MAV_SENSOR_ROTATION_YAW_315 = 7,
3559    #[doc = "Roll: 180, Pitch: 0, Yaw: 0"]
3560    MAV_SENSOR_ROTATION_ROLL_180 = 8,
3561    #[doc = "Roll: 180, Pitch: 0, Yaw: 45"]
3562    MAV_SENSOR_ROTATION_ROLL_180_YAW_45 = 9,
3563    #[doc = "Roll: 180, Pitch: 0, Yaw: 90"]
3564    MAV_SENSOR_ROTATION_ROLL_180_YAW_90 = 10,
3565    #[doc = "Roll: 180, Pitch: 0, Yaw: 135"]
3566    MAV_SENSOR_ROTATION_ROLL_180_YAW_135 = 11,
3567    #[doc = "Roll: 0, Pitch: 180, Yaw: 0"]
3568    MAV_SENSOR_ROTATION_PITCH_180 = 12,
3569    #[doc = "Roll: 180, Pitch: 0, Yaw: 225"]
3570    MAV_SENSOR_ROTATION_ROLL_180_YAW_225 = 13,
3571    #[doc = "Roll: 180, Pitch: 0, Yaw: 270"]
3572    MAV_SENSOR_ROTATION_ROLL_180_YAW_270 = 14,
3573    #[doc = "Roll: 180, Pitch: 0, Yaw: 315"]
3574    MAV_SENSOR_ROTATION_ROLL_180_YAW_315 = 15,
3575    #[doc = "Roll: 90, Pitch: 0, Yaw: 0"]
3576    MAV_SENSOR_ROTATION_ROLL_90 = 16,
3577    #[doc = "Roll: 90, Pitch: 0, Yaw: 45"]
3578    MAV_SENSOR_ROTATION_ROLL_90_YAW_45 = 17,
3579    #[doc = "Roll: 90, Pitch: 0, Yaw: 90"]
3580    MAV_SENSOR_ROTATION_ROLL_90_YAW_90 = 18,
3581    #[doc = "Roll: 90, Pitch: 0, Yaw: 135"]
3582    MAV_SENSOR_ROTATION_ROLL_90_YAW_135 = 19,
3583    #[doc = "Roll: 270, Pitch: 0, Yaw: 0"]
3584    MAV_SENSOR_ROTATION_ROLL_270 = 20,
3585    #[doc = "Roll: 270, Pitch: 0, Yaw: 45"]
3586    MAV_SENSOR_ROTATION_ROLL_270_YAW_45 = 21,
3587    #[doc = "Roll: 270, Pitch: 0, Yaw: 90"]
3588    MAV_SENSOR_ROTATION_ROLL_270_YAW_90 = 22,
3589    #[doc = "Roll: 270, Pitch: 0, Yaw: 135"]
3590    MAV_SENSOR_ROTATION_ROLL_270_YAW_135 = 23,
3591    #[doc = "Roll: 0, Pitch: 90, Yaw: 0"]
3592    MAV_SENSOR_ROTATION_PITCH_90 = 24,
3593    #[doc = "Roll: 0, Pitch: 270, Yaw: 0"]
3594    MAV_SENSOR_ROTATION_PITCH_270 = 25,
3595    #[doc = "Roll: 0, Pitch: 180, Yaw: 90"]
3596    MAV_SENSOR_ROTATION_PITCH_180_YAW_90 = 26,
3597    #[doc = "Roll: 0, Pitch: 180, Yaw: 270"]
3598    MAV_SENSOR_ROTATION_PITCH_180_YAW_270 = 27,
3599    #[doc = "Roll: 90, Pitch: 90, Yaw: 0"]
3600    MAV_SENSOR_ROTATION_ROLL_90_PITCH_90 = 28,
3601    #[doc = "Roll: 180, Pitch: 90, Yaw: 0"]
3602    MAV_SENSOR_ROTATION_ROLL_180_PITCH_90 = 29,
3603    #[doc = "Roll: 270, Pitch: 90, Yaw: 0"]
3604    MAV_SENSOR_ROTATION_ROLL_270_PITCH_90 = 30,
3605    #[doc = "Roll: 90, Pitch: 180, Yaw: 0"]
3606    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180 = 31,
3607    #[doc = "Roll: 270, Pitch: 180, Yaw: 0"]
3608    MAV_SENSOR_ROTATION_ROLL_270_PITCH_180 = 32,
3609    #[doc = "Roll: 90, Pitch: 270, Yaw: 0"]
3610    MAV_SENSOR_ROTATION_ROLL_90_PITCH_270 = 33,
3611    #[doc = "Roll: 180, Pitch: 270, Yaw: 0"]
3612    MAV_SENSOR_ROTATION_ROLL_180_PITCH_270 = 34,
3613    #[doc = "Roll: 270, Pitch: 270, Yaw: 0"]
3614    MAV_SENSOR_ROTATION_ROLL_270_PITCH_270 = 35,
3615    #[doc = "Roll: 90, Pitch: 180, Yaw: 90"]
3616    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180_YAW_90 = 36,
3617    #[doc = "Roll: 90, Pitch: 0, Yaw: 270"]
3618    MAV_SENSOR_ROTATION_ROLL_90_YAW_270 = 37,
3619    #[doc = "Roll: 90, Pitch: 68, Yaw: 293"]
3620    MAV_SENSOR_ROTATION_ROLL_90_PITCH_68_YAW_293 = 38,
3621    #[doc = "Pitch: 315"]
3622    MAV_SENSOR_ROTATION_PITCH_315 = 39,
3623    #[doc = "Roll: 90, Pitch: 315"]
3624    MAV_SENSOR_ROTATION_ROLL_90_PITCH_315 = 40,
3625    #[doc = "Custom orientation"]
3626    MAV_SENSOR_ROTATION_CUSTOM = 100,
3627}
3628impl MavSensorOrientation {
3629    pub const DEFAULT: Self = Self::MAV_SENSOR_ROTATION_NONE;
3630}
3631impl Default for MavSensorOrientation {
3632    fn default() -> Self {
3633        Self::DEFAULT
3634    }
3635}
3636#[cfg_attr(feature = "ts", derive(TS))]
3637#[cfg_attr(feature = "ts", ts(export))]
3638#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3639#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3640#[cfg_attr(feature = "serde", serde(tag = "type"))]
3641#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3642#[repr(u32)]
3643#[doc = "Indicates the severity level, generally used for status messages to indicate their relative urgency. Based on RFC-5424 using expanded definitions at: <http://www.kiwisyslog.com/kb/info:-syslog-message-levels/>."]
3644pub enum MavSeverity {
3645    #[doc = "System is unusable. This is a \"panic\" condition."]
3646    MAV_SEVERITY_EMERGENCY = 0,
3647    #[doc = "Action should be taken immediately. Indicates error in non-critical systems."]
3648    MAV_SEVERITY_ALERT = 1,
3649    #[doc = "Action must be taken immediately. Indicates failure in a primary system."]
3650    MAV_SEVERITY_CRITICAL = 2,
3651    #[doc = "Indicates an error in secondary/redundant systems."]
3652    MAV_SEVERITY_ERROR = 3,
3653    #[doc = "Indicates about a possible future error if this is not resolved within a given timeframe. Example would be a low battery warning."]
3654    MAV_SEVERITY_WARNING = 4,
3655    #[doc = "An unusual event has occurred, though not an error condition. This should be investigated for the root cause."]
3656    MAV_SEVERITY_NOTICE = 5,
3657    #[doc = "Normal operational messages. Useful for logging. No action is required for these messages."]
3658    MAV_SEVERITY_INFO = 6,
3659    #[doc = "Useful non-operational messages that can assist in debugging. These should not occur during normal operation."]
3660    MAV_SEVERITY_DEBUG = 7,
3661}
3662impl MavSeverity {
3663    pub const DEFAULT: Self = Self::MAV_SEVERITY_EMERGENCY;
3664}
3665impl Default for MavSeverity {
3666    fn default() -> Self {
3667        Self::DEFAULT
3668    }
3669}
3670#[cfg_attr(feature = "ts", derive(TS))]
3671#[cfg_attr(feature = "ts", ts(export))]
3672#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3673#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3674#[cfg_attr(feature = "serde", serde(tag = "type"))]
3675#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3676#[repr(u32)]
3677#[doc = "Standard modes with a well understood meaning across flight stacks and vehicle types.         For example, most flight stack have the concept of a \"return\" or \"RTL\" mode that takes a vehicle to safety, even though the precise mechanics of this mode may differ.         The modes supported by a flight stack can be queried using AVAILABLE_MODES and set using MAV_CMD_DO_SET_STANDARD_MODE.         The current mode is streamed in CURRENT_MODE.         See <https://mavlink.io/en/services/standard_modes.html>"]
3678pub enum MavStandardMode {
3679    #[doc = "Non standard mode.           This may be used when reporting the mode if the current flight mode is not a standard mode."]
3680    MAV_STANDARD_MODE_NON_STANDARD = 0,
3681    #[doc = "Position mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold both position and altitude against wind and external forces.           This mode can only be set by vehicles that can hold a fixed position.           Multicopter (MC) vehicles actively brake and hold both position and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to multicopter mode (if needed) but otherwise behave in the same way as MC vehicles.           Fixed-wing (FW) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3682    MAV_STANDARD_MODE_POSITION_HOLD = 1,
3683    #[doc = "Orbit (manual).           Position-controlled and stabilized manual mode.           The vehicle circles around a fixed setpoint in the horizontal plane at a particular radius, altitude, and direction.           Flight stacks may further allow manual control over the setpoint position, radius, direction, speed, and/or altitude of the circle, but this is not mandated.           Flight stacks may support the [MAV_CMD_DO_ORBIT](<https://mavlink.io/en/messages/common.html#MAV_CMD_DO_ORBIT>) for changing the orbit parameters.           MC and FW vehicles may support this mode.           Hybrid MC/FW (\"VTOL\") vehicles may support this mode in MC/FW or both modes; if the mode is not supported by the current configuration the vehicle should transition to the supported configuration.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3684    MAV_STANDARD_MODE_ORBIT = 2,
3685    #[doc = "Cruise mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their original track against wind and external forces.           Fixed-wing (FW) vehicles level orientation and maintain current track and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to FW mode (if needed) but otherwise behave in the same way as MC vehicles.           Multicopter (MC) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3686    MAV_STANDARD_MODE_CRUISE = 3,
3687    #[doc = "Altitude hold (manual).           Altitude-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their altitude.           MC vehicles continue with existing momentum and may move with wind (or other external forces).           FW vehicles continue with current heading, but may be moved off-track by wind.           Hybrid MC/FW (\"VTOL\") vehicles behave according to their current configuration/mode (FW or MC).           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3688    MAV_STANDARD_MODE_ALTITUDE_HOLD = 4,
3689    #[doc = "Safe recovery mode (auto).           Automatic mode that takes vehicle to a predefined safe location via a safe flight path, and may also automatically land the vehicle.           This mode is more commonly referred to as RTL and/or or Smart RTL.           The precise return location, flight path, and landing behaviour depend on vehicle configuration and type.           For example, the vehicle might return to the home/launch location, a rally point, or the start of a mission landing, it might follow a direct path, mission path, or breadcrumb path, and land using a mission landing pattern or some other kind of descent."]
3690    MAV_STANDARD_MODE_SAFE_RECOVERY = 5,
3691    #[doc = "Mission mode (automatic).           Automatic mode that executes MAVLink missions.           Missions are executed from the current waypoint as soon as the mode is enabled."]
3692    MAV_STANDARD_MODE_MISSION = 6,
3693    #[doc = "Land mode (auto).           Automatic mode that lands the vehicle at the current location.           The precise landing behaviour depends on vehicle configuration and type."]
3694    MAV_STANDARD_MODE_LAND = 7,
3695    #[doc = "Takeoff mode (auto).           Automatic takeoff mode.           The precise takeoff behaviour depends on vehicle configuration and type."]
3696    MAV_STANDARD_MODE_TAKEOFF = 8,
3697}
3698impl MavStandardMode {
3699    pub const DEFAULT: Self = Self::MAV_STANDARD_MODE_NON_STANDARD;
3700}
3701impl Default for MavStandardMode {
3702    fn default() -> Self {
3703        Self::DEFAULT
3704    }
3705}
3706#[cfg_attr(feature = "ts", derive(TS))]
3707#[cfg_attr(feature = "ts", ts(export))]
3708#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3709#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3710#[cfg_attr(feature = "serde", serde(tag = "type"))]
3711#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3712#[repr(u32)]
3713pub enum MavState {
3714    #[doc = "Uninitialized system, state is unknown."]
3715    MAV_STATE_UNINIT = 0,
3716    #[doc = "System is booting up."]
3717    MAV_STATE_BOOT = 1,
3718    #[doc = "System is calibrating and not flight-ready."]
3719    MAV_STATE_CALIBRATING = 2,
3720    #[doc = "System is grounded and on standby. It can be launched any time."]
3721    MAV_STATE_STANDBY = 3,
3722    #[doc = "System is active and might be already airborne. Motors are engaged."]
3723    MAV_STATE_ACTIVE = 4,
3724    #[doc = "System is in a non-normal flight mode (failsafe). It can however still navigate."]
3725    MAV_STATE_CRITICAL = 5,
3726    #[doc = "System is in a non-normal flight mode (failsafe). It lost control over parts or over the whole airframe. It is in mayday and going down."]
3727    MAV_STATE_EMERGENCY = 6,
3728    #[doc = "System just initialized its power-down sequence, will shut down now."]
3729    MAV_STATE_POWEROFF = 7,
3730    #[doc = "System is terminating itself (failsafe or commanded)."]
3731    MAV_STATE_FLIGHT_TERMINATION = 8,
3732}
3733impl MavState {
3734    pub const DEFAULT: Self = Self::MAV_STATE_UNINIT;
3735}
3736impl Default for MavState {
3737    fn default() -> Self {
3738        Self::DEFAULT
3739    }
3740}
3741bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message."] pub struct MavSysStatusSensor : u32 { # [doc = "0x01 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO = 1 ; # [doc = "0x02 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL = 2 ; # [doc = "0x04 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG = 4 ; # [doc = "0x08 absolute pressure"] const MAV_SYS_STATUS_SENSOR_ABSOLUTE_PRESSURE = 8 ; # [doc = "0x10 differential pressure"] const MAV_SYS_STATUS_SENSOR_DIFFERENTIAL_PRESSURE = 16 ; # [doc = "0x20 GPS"] const MAV_SYS_STATUS_SENSOR_GPS = 32 ; # [doc = "0x40 optical flow"] const MAV_SYS_STATUS_SENSOR_OPTICAL_FLOW = 64 ; # [doc = "0x80 computer vision position"] const MAV_SYS_STATUS_SENSOR_VISION_POSITION = 128 ; # [doc = "0x100 laser based position"] const MAV_SYS_STATUS_SENSOR_LASER_POSITION = 256 ; # [doc = "0x200 external ground truth (Vicon or Leica)"] const MAV_SYS_STATUS_SENSOR_EXTERNAL_GROUND_TRUTH = 512 ; # [doc = "0x400 3D angular rate control"] const MAV_SYS_STATUS_SENSOR_ANGULAR_RATE_CONTROL = 1024 ; # [doc = "0x800 attitude stabilization"] const MAV_SYS_STATUS_SENSOR_ATTITUDE_STABILIZATION = 2048 ; # [doc = "0x1000 yaw position"] const MAV_SYS_STATUS_SENSOR_YAW_POSITION = 4096 ; # [doc = "0x2000 z/altitude control"] const MAV_SYS_STATUS_SENSOR_Z_ALTITUDE_CONTROL = 8192 ; # [doc = "0x4000 x/y position control"] const MAV_SYS_STATUS_SENSOR_XY_POSITION_CONTROL = 16384 ; # [doc = "0x8000 motor outputs / control"] const MAV_SYS_STATUS_SENSOR_MOTOR_OUTPUTS = 32768 ; # [doc = "0x10000 RC receiver"] const MAV_SYS_STATUS_SENSOR_RC_RECEIVER = 65536 ; # [doc = "0x20000 2nd 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO2 = 131072 ; # [doc = "0x40000 2nd 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL2 = 262144 ; # [doc = "0x80000 2nd 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG2 = 524288 ; # [doc = "0x100000 geofence"] const MAV_SYS_STATUS_GEOFENCE = 1048576 ; # [doc = "0x200000 AHRS subsystem health"] const MAV_SYS_STATUS_AHRS = 2097152 ; # [doc = "0x400000 Terrain subsystem health"] const MAV_SYS_STATUS_TERRAIN = 4194304 ; # [doc = "0x800000 Motors are reversed"] const MAV_SYS_STATUS_REVERSE_MOTOR = 8388608 ; # [doc = "0x1000000 Logging"] const MAV_SYS_STATUS_LOGGING = 16777216 ; # [doc = "0x2000000 Battery"] const MAV_SYS_STATUS_SENSOR_BATTERY = 33554432 ; # [doc = "0x4000000 Proximity"] const MAV_SYS_STATUS_SENSOR_PROXIMITY = 67108864 ; # [doc = "0x8000000 Satellite Communication"] const MAV_SYS_STATUS_SENSOR_SATCOM = 134217728 ; # [doc = "0x10000000 pre-arm check status. Always healthy when armed"] const MAV_SYS_STATUS_PREARM_CHECK = 268435456 ; # [doc = "0x20000000 Avoidance/collision prevention"] const MAV_SYS_STATUS_OBSTACLE_AVOIDANCE = 536870912 ; # [doc = "0x40000000 propulsion (actuator, esc, motor or propellor)"] const MAV_SYS_STATUS_SENSOR_PROPULSION = 1073741824 ; # [doc = "0x80000000 Extended bit-field are used for further sensor status bits (needs to be set in onboard_control_sensors_present only)"] const MAV_SYS_STATUS_EXTENSION_USED = 2147483648 ; } }
3742impl MavSysStatusSensor {
3743    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_SENSOR_3D_GYRO;
3744}
3745impl Default for MavSysStatusSensor {
3746    fn default() -> Self {
3747        Self::DEFAULT
3748    }
3749}
3750bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message in the extended fields."] pub struct MavSysStatusSensorExtended : u32 { # [doc = "0x01 Recovery system (parachute, balloon, retracts etc)"] const MAV_SYS_STATUS_RECOVERY_SYSTEM = 1 ; } }
3751impl MavSysStatusSensorExtended {
3752    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_RECOVERY_SYSTEM;
3753}
3754impl Default for MavSysStatusSensorExtended {
3755    fn default() -> Self {
3756        Self::DEFAULT
3757    }
3758}
3759#[cfg_attr(feature = "ts", derive(TS))]
3760#[cfg_attr(feature = "ts", ts(export))]
3761#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3762#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3763#[cfg_attr(feature = "serde", serde(tag = "type"))]
3764#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3765#[repr(u32)]
3766pub enum MavTunnelPayloadType {
3767    #[doc = "Encoding of payload unknown."]
3768    MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN = 0,
3769    #[doc = "Registered for STorM32 gimbal controller."]
3770    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED0 = 200,
3771    #[doc = "Registered for STorM32 gimbal controller."]
3772    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED1 = 201,
3773    #[doc = "Registered for STorM32 gimbal controller."]
3774    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED2 = 202,
3775    #[doc = "Registered for STorM32 gimbal controller."]
3776    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED3 = 203,
3777    #[doc = "Registered for STorM32 gimbal controller."]
3778    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED4 = 204,
3779    #[doc = "Registered for STorM32 gimbal controller."]
3780    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED5 = 205,
3781    #[doc = "Registered for STorM32 gimbal controller."]
3782    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED6 = 206,
3783    #[doc = "Registered for STorM32 gimbal controller."]
3784    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED7 = 207,
3785    #[doc = "Registered for STorM32 gimbal controller."]
3786    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED8 = 208,
3787    #[doc = "Registered for STorM32 gimbal controller."]
3788    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED9 = 209,
3789    #[doc = "Registered for ModalAI remote OSD protocol."]
3790    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_REMOTE_OSD = 210,
3791    #[doc = "Registered for ModalAI ESC UART passthru protocol."]
3792    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_ESC_UART_PASSTHRU = 211,
3793    #[doc = "Registered for ModalAI vendor use."]
3794    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_IO_UART_PASSTHRU = 212,
3795}
3796impl MavTunnelPayloadType {
3797    pub const DEFAULT: Self = Self::MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN;
3798}
3799impl Default for MavTunnelPayloadType {
3800    fn default() -> Self {
3801        Self::DEFAULT
3802    }
3803}
3804#[cfg_attr(feature = "ts", derive(TS))]
3805#[cfg_attr(feature = "ts", ts(export))]
3806#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3807#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3808#[cfg_attr(feature = "serde", serde(tag = "type"))]
3809#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3810#[repr(u32)]
3811#[doc = "MAVLINK component type reported in HEARTBEAT message. Flight controllers must report the type of the vehicle on which they are mounted (e.g. MAV_TYPE_OCTOROTOR). All other components must report a value appropriate for their type (e.g. a camera must use MAV_TYPE_CAMERA)."]
3812pub enum MavType {
3813    #[doc = "Generic micro air vehicle"]
3814    MAV_TYPE_GENERIC = 0,
3815    #[doc = "Fixed wing aircraft."]
3816    MAV_TYPE_FIXED_WING = 1,
3817    #[doc = "Quadrotor"]
3818    MAV_TYPE_QUADROTOR = 2,
3819    #[doc = "Coaxial helicopter"]
3820    MAV_TYPE_COAXIAL = 3,
3821    #[doc = "Normal helicopter with tail rotor."]
3822    MAV_TYPE_HELICOPTER = 4,
3823    #[doc = "Ground installation"]
3824    MAV_TYPE_ANTENNA_TRACKER = 5,
3825    #[doc = "Operator control unit / ground control station"]
3826    MAV_TYPE_GCS = 6,
3827    #[doc = "Airship, controlled"]
3828    MAV_TYPE_AIRSHIP = 7,
3829    #[doc = "Free balloon, uncontrolled"]
3830    MAV_TYPE_FREE_BALLOON = 8,
3831    #[doc = "Rocket"]
3832    MAV_TYPE_ROCKET = 9,
3833    #[doc = "Ground rover"]
3834    MAV_TYPE_GROUND_ROVER = 10,
3835    #[doc = "Surface vessel, boat, ship"]
3836    MAV_TYPE_SURFACE_BOAT = 11,
3837    #[doc = "Submarine"]
3838    MAV_TYPE_SUBMARINE = 12,
3839    #[doc = "Hexarotor"]
3840    MAV_TYPE_HEXAROTOR = 13,
3841    #[doc = "Octorotor"]
3842    MAV_TYPE_OCTOROTOR = 14,
3843    #[doc = "Tricopter"]
3844    MAV_TYPE_TRICOPTER = 15,
3845    #[doc = "Flapping wing"]
3846    MAV_TYPE_FLAPPING_WING = 16,
3847    #[doc = "Kite"]
3848    MAV_TYPE_KITE = 17,
3849    #[doc = "Onboard companion controller"]
3850    MAV_TYPE_ONBOARD_CONTROLLER = 18,
3851    #[doc = "Two-rotor Tailsitter VTOL that additionally uses control surfaces in vertical operation. Note, value previously named MAV_TYPE_VTOL_DUOROTOR."]
3852    MAV_TYPE_VTOL_TAILSITTER_DUOROTOR = 19,
3853    #[doc = "Quad-rotor Tailsitter VTOL using a V-shaped quad config in vertical operation. Note: value previously named MAV_TYPE_VTOL_QUADROTOR."]
3854    MAV_TYPE_VTOL_TAILSITTER_QUADROTOR = 20,
3855    #[doc = "Tiltrotor VTOL. Fuselage and wings stay (nominally) horizontal in all flight phases. It able to tilt (some) rotors to provide thrust in cruise flight."]
3856    MAV_TYPE_VTOL_TILTROTOR = 21,
3857    #[doc = "VTOL with separate fixed rotors for hover and cruise flight. Fuselage and wings stay (nominally) horizontal in all flight phases."]
3858    MAV_TYPE_VTOL_FIXEDROTOR = 22,
3859    #[doc = "Tailsitter VTOL. Fuselage and wings orientation changes depending on flight phase: vertical for hover, horizontal for cruise. Use more specific VTOL MAV_TYPE_VTOL_TAILSITTER_DUOROTOR or MAV_TYPE_VTOL_TAILSITTER_QUADROTOR if appropriate."]
3860    MAV_TYPE_VTOL_TAILSITTER = 23,
3861    #[doc = "Tiltwing VTOL. Fuselage stays horizontal in all flight phases. The whole wing, along with any attached engine, can tilt between vertical and horizontal mode."]
3862    MAV_TYPE_VTOL_TILTWING = 24,
3863    #[doc = "VTOL reserved 5"]
3864    MAV_TYPE_VTOL_RESERVED5 = 25,
3865    #[doc = "Gimbal"]
3866    MAV_TYPE_GIMBAL = 26,
3867    #[doc = "ADSB system"]
3868    MAV_TYPE_ADSB = 27,
3869    #[doc = "Steerable, nonrigid airfoil"]
3870    MAV_TYPE_PARAFOIL = 28,
3871    #[doc = "Dodecarotor"]
3872    MAV_TYPE_DODECAROTOR = 29,
3873    #[doc = "Camera"]
3874    MAV_TYPE_CAMERA = 30,
3875    #[doc = "Charging station"]
3876    MAV_TYPE_CHARGING_STATION = 31,
3877    #[doc = "FLARM collision avoidance system"]
3878    MAV_TYPE_FLARM = 32,
3879    #[doc = "Servo"]
3880    MAV_TYPE_SERVO = 33,
3881    #[doc = "Open Drone ID. See <https://mavlink.io/en/services/opendroneid.html>."]
3882    MAV_TYPE_ODID = 34,
3883    #[doc = "Decarotor"]
3884    MAV_TYPE_DECAROTOR = 35,
3885    #[doc = "Battery"]
3886    MAV_TYPE_BATTERY = 36,
3887    #[doc = "Parachute"]
3888    MAV_TYPE_PARACHUTE = 37,
3889    #[doc = "Log"]
3890    MAV_TYPE_LOG = 38,
3891    #[doc = "OSD"]
3892    MAV_TYPE_OSD = 39,
3893    #[doc = "IMU"]
3894    MAV_TYPE_IMU = 40,
3895    #[doc = "GPS"]
3896    MAV_TYPE_GPS = 41,
3897    #[doc = "Winch"]
3898    MAV_TYPE_WINCH = 42,
3899    #[doc = "Generic multirotor that does not fit into a specific type or whose type is unknown"]
3900    MAV_TYPE_GENERIC_MULTIROTOR = 43,
3901    #[doc = "Illuminator. An illuminator is a light source that is used for lighting up dark areas external to the sytstem: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
3902    MAV_TYPE_ILLUMINATOR = 44,
3903    #[doc = "Orbiter spacecraft. Includes satellites orbiting terrestrial and extra-terrestrial bodies. Follows NASA Spacecraft Classification."]
3904    MAV_TYPE_SPACECRAFT_ORBITER = 45,
3905}
3906impl MavType {
3907    pub const DEFAULT: Self = Self::MAV_TYPE_GENERIC;
3908}
3909impl Default for MavType {
3910    fn default() -> Self {
3911        Self::DEFAULT
3912    }
3913}
3914#[cfg_attr(feature = "ts", derive(TS))]
3915#[cfg_attr(feature = "ts", ts(export))]
3916#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3917#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3918#[cfg_attr(feature = "serde", serde(tag = "type"))]
3919#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3920#[repr(u32)]
3921#[doc = "Enumeration of VTOL states"]
3922pub enum MavVtolState {
3923    #[doc = "MAV is not configured as VTOL"]
3924    MAV_VTOL_STATE_UNDEFINED = 0,
3925    #[doc = "VTOL is in transition from multicopter to fixed-wing"]
3926    MAV_VTOL_STATE_TRANSITION_TO_FW = 1,
3927    #[doc = "VTOL is in transition from fixed-wing to multicopter"]
3928    MAV_VTOL_STATE_TRANSITION_TO_MC = 2,
3929    #[doc = "VTOL is in multicopter state"]
3930    MAV_VTOL_STATE_MC = 3,
3931    #[doc = "VTOL is in fixed-wing state"]
3932    MAV_VTOL_STATE_FW = 4,
3933}
3934impl MavVtolState {
3935    pub const DEFAULT: Self = Self::MAV_VTOL_STATE_UNDEFINED;
3936}
3937impl Default for MavVtolState {
3938    fn default() -> Self {
3939        Self::DEFAULT
3940    }
3941}
3942bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Winch status flags used in WINCH_STATUS"] pub struct MavWinchStatusFlag : u32 { # [doc = "Winch is healthy"] const MAV_WINCH_STATUS_HEALTHY = 1 ; # [doc = "Winch line is fully retracted"] const MAV_WINCH_STATUS_FULLY_RETRACTED = 2 ; # [doc = "Winch motor is moving"] const MAV_WINCH_STATUS_MOVING = 4 ; # [doc = "Winch clutch is engaged allowing motor to move freely."] const MAV_WINCH_STATUS_CLUTCH_ENGAGED = 8 ; # [doc = "Winch is locked by locking mechanism."] const MAV_WINCH_STATUS_LOCKED = 16 ; # [doc = "Winch is gravity dropping payload."] const MAV_WINCH_STATUS_DROPPING = 32 ; # [doc = "Winch is arresting payload descent."] const MAV_WINCH_STATUS_ARRESTING = 64 ; # [doc = "Winch is using torque measurements to sense the ground."] const MAV_WINCH_STATUS_GROUND_SENSE = 128 ; # [doc = "Winch is returning to the fully retracted position."] const MAV_WINCH_STATUS_RETRACTING = 256 ; # [doc = "Winch is redelivering the payload. This is a failover state if the line tension goes above a threshold during RETRACTING."] const MAV_WINCH_STATUS_REDELIVER = 512 ; # [doc = "Winch is abandoning the line and possibly payload. Winch unspools the entire calculated line length. This is a failover state from REDELIVER if the number of attempts exceeds a threshold."] const MAV_WINCH_STATUS_ABANDON_LINE = 1024 ; # [doc = "Winch is engaging the locking mechanism."] const MAV_WINCH_STATUS_LOCKING = 2048 ; # [doc = "Winch is spooling on line."] const MAV_WINCH_STATUS_LOAD_LINE = 4096 ; # [doc = "Winch is loading a payload."] const MAV_WINCH_STATUS_LOAD_PAYLOAD = 8192 ; } }
3943impl MavWinchStatusFlag {
3944    pub const DEFAULT: Self = Self::MAV_WINCH_STATUS_HEALTHY;
3945}
3946impl Default for MavWinchStatusFlag {
3947    fn default() -> Self {
3948        Self::DEFAULT
3949    }
3950}
3951#[cfg_attr(feature = "ts", derive(TS))]
3952#[cfg_attr(feature = "ts", ts(export))]
3953#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3954#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3955#[cfg_attr(feature = "serde", serde(tag = "type"))]
3956#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3957#[repr(u32)]
3958pub enum MavlinkDataStreamType {
3959    MAVLINK_DATA_STREAM_IMG_JPEG = 0,
3960    MAVLINK_DATA_STREAM_IMG_BMP = 1,
3961    MAVLINK_DATA_STREAM_IMG_RAW8U = 2,
3962    MAVLINK_DATA_STREAM_IMG_RAW32U = 3,
3963    MAVLINK_DATA_STREAM_IMG_PGM = 4,
3964    MAVLINK_DATA_STREAM_IMG_PNG = 5,
3965}
3966impl MavlinkDataStreamType {
3967    pub const DEFAULT: Self = Self::MAVLINK_DATA_STREAM_IMG_JPEG;
3968}
3969impl Default for MavlinkDataStreamType {
3970    fn default() -> Self {
3971        Self::DEFAULT
3972    }
3973}
3974#[cfg_attr(feature = "ts", derive(TS))]
3975#[cfg_attr(feature = "ts", ts(export))]
3976#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3977#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3978#[cfg_attr(feature = "serde", serde(tag = "type"))]
3979#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3980#[repr(u32)]
3981#[doc = "States of the mission state machine.         Note that these states are independent of whether the mission is in a mode that can execute mission items or not (is suspended).         They may not all be relevant on all vehicles."]
3982pub enum MissionState {
3983    #[doc = "The mission status reporting is not supported."]
3984    MISSION_STATE_UNKNOWN = 0,
3985    #[doc = "No mission on the vehicle."]
3986    MISSION_STATE_NO_MISSION = 1,
3987    #[doc = "Mission has not started. This is the case after a mission has uploaded but not yet started executing."]
3988    MISSION_STATE_NOT_STARTED = 2,
3989    #[doc = "Mission is active, and will execute mission items when in auto mode."]
3990    MISSION_STATE_ACTIVE = 3,
3991    #[doc = "Mission is paused when in auto mode."]
3992    MISSION_STATE_PAUSED = 4,
3993    #[doc = "Mission has executed all mission items."]
3994    MISSION_STATE_COMPLETE = 5,
3995}
3996impl MissionState {
3997    pub const DEFAULT: Self = Self::MISSION_STATE_UNKNOWN;
3998}
3999impl Default for MissionState {
4000    fn default() -> Self {
4001        Self::DEFAULT
4002    }
4003}
4004#[cfg_attr(feature = "ts", derive(TS))]
4005#[cfg_attr(feature = "ts", ts(export))]
4006#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4007#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4008#[cfg_attr(feature = "serde", serde(tag = "type"))]
4009#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4010#[repr(u32)]
4011#[doc = "Sequence that motors are tested when using MAV_CMD_DO_MOTOR_TEST."]
4012pub enum MotorTestOrder {
4013    #[doc = "Default autopilot motor test method."]
4014    MOTOR_TEST_ORDER_DEFAULT = 0,
4015    #[doc = "Motor numbers are specified as their index in a predefined vehicle-specific sequence."]
4016    MOTOR_TEST_ORDER_SEQUENCE = 1,
4017    #[doc = "Motor numbers are specified as the output as labeled on the board."]
4018    MOTOR_TEST_ORDER_BOARD = 2,
4019}
4020impl MotorTestOrder {
4021    pub const DEFAULT: Self = Self::MOTOR_TEST_ORDER_DEFAULT;
4022}
4023impl Default for MotorTestOrder {
4024    fn default() -> Self {
4025        Self::DEFAULT
4026    }
4027}
4028#[cfg_attr(feature = "ts", derive(TS))]
4029#[cfg_attr(feature = "ts", ts(export))]
4030#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4031#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4032#[cfg_attr(feature = "serde", serde(tag = "type"))]
4033#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4034#[repr(u32)]
4035#[doc = "Defines how throttle value is represented in MAV_CMD_DO_MOTOR_TEST."]
4036pub enum MotorTestThrottleType {
4037    #[doc = "Throttle as a percentage (0 ~ 100)"]
4038    MOTOR_TEST_THROTTLE_PERCENT = 0,
4039    #[doc = "Throttle as an absolute PWM value (normally in range of 1000~2000)."]
4040    MOTOR_TEST_THROTTLE_PWM = 1,
4041    #[doc = "Throttle pass-through from pilot's transmitter."]
4042    MOTOR_TEST_THROTTLE_PILOT = 2,
4043    #[doc = "Per-motor compass calibration test."]
4044    MOTOR_TEST_COMPASS_CAL = 3,
4045}
4046impl MotorTestThrottleType {
4047    pub const DEFAULT: Self = Self::MOTOR_TEST_THROTTLE_PERCENT;
4048}
4049impl Default for MotorTestThrottleType {
4050    fn default() -> Self {
4051        Self::DEFAULT
4052    }
4053}
4054#[cfg_attr(feature = "ts", derive(TS))]
4055#[cfg_attr(feature = "ts", ts(export))]
4056#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4057#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4058#[cfg_attr(feature = "serde", serde(tag = "type"))]
4059#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4060#[repr(u32)]
4061pub enum NavVtolLandOptions {
4062    #[doc = "Default autopilot landing behaviour."]
4063    NAV_VTOL_LAND_OPTIONS_DEFAULT = 0,
4064    #[doc = "Descend in fixed wing mode, transitioning to multicopter mode for vertical landing when close to the ground.           The fixed wing descent pattern is at the discretion of the vehicle (e.g. transition altitude, loiter direction, radius, and speed, etc.)."]
4065    NAV_VTOL_LAND_OPTIONS_FW_DESCENT = 1,
4066    #[doc = "Land in multicopter mode on reaching the landing coordinates (the whole landing is by \"hover descent\")."]
4067    NAV_VTOL_LAND_OPTIONS_HOVER_DESCENT = 2,
4068}
4069impl NavVtolLandOptions {
4070    pub const DEFAULT: Self = Self::NAV_VTOL_LAND_OPTIONS_DEFAULT;
4071}
4072impl Default for NavVtolLandOptions {
4073    fn default() -> Self {
4074        Self::DEFAULT
4075    }
4076}
4077#[cfg_attr(feature = "ts", derive(TS))]
4078#[cfg_attr(feature = "ts", ts(export))]
4079#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4080#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4081#[cfg_attr(feature = "serde", serde(tag = "type"))]
4082#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4083#[repr(u32)]
4084#[doc = "Yaw behaviour during orbit flight."]
4085pub enum OrbitYawBehaviour {
4086    #[doc = "Vehicle front points to the center (default)."]
4087    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER = 0,
4088    #[doc = "Vehicle front holds heading when message received."]
4089    ORBIT_YAW_BEHAVIOUR_HOLD_INITIAL_HEADING = 1,
4090    #[doc = "Yaw uncontrolled."]
4091    ORBIT_YAW_BEHAVIOUR_UNCONTROLLED = 2,
4092    #[doc = "Vehicle front follows flight path (tangential to circle)."]
4093    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TANGENT_TO_CIRCLE = 3,
4094    #[doc = "Yaw controlled by RC input."]
4095    ORBIT_YAW_BEHAVIOUR_RC_CONTROLLED = 4,
4096    #[doc = "Vehicle uses current yaw behaviour (unchanged). The vehicle-default yaw behaviour is used if this value is specified when orbit is first commanded."]
4097    ORBIT_YAW_BEHAVIOUR_UNCHANGED = 5,
4098}
4099impl OrbitYawBehaviour {
4100    pub const DEFAULT: Self = Self::ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER;
4101}
4102impl Default for OrbitYawBehaviour {
4103    fn default() -> Self {
4104        Self::DEFAULT
4105    }
4106}
4107#[cfg_attr(feature = "ts", derive(TS))]
4108#[cfg_attr(feature = "ts", ts(export))]
4109#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4110#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4111#[cfg_attr(feature = "serde", serde(tag = "type"))]
4112#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4113#[repr(u32)]
4114#[doc = "Parachute actions. Trigger release and enable/disable auto-release."]
4115pub enum ParachuteAction {
4116    #[doc = "Disable auto-release of parachute (i.e. release triggered by crash detectors)."]
4117    PARACHUTE_DISABLE = 0,
4118    #[doc = "Enable auto-release of parachute."]
4119    PARACHUTE_ENABLE = 1,
4120    #[doc = "Release parachute and kill motors."]
4121    PARACHUTE_RELEASE = 2,
4122}
4123impl ParachuteAction {
4124    pub const DEFAULT: Self = Self::PARACHUTE_DISABLE;
4125}
4126impl Default for ParachuteAction {
4127    fn default() -> Self {
4128        Self::DEFAULT
4129    }
4130}
4131#[cfg_attr(feature = "ts", derive(TS))]
4132#[cfg_attr(feature = "ts", ts(export))]
4133#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4134#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4135#[cfg_attr(feature = "serde", serde(tag = "type"))]
4136#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4137#[repr(u32)]
4138#[doc = "Result from PARAM_EXT_SET message."]
4139pub enum ParamAck {
4140    #[doc = "Parameter value ACCEPTED and SET"]
4141    PARAM_ACK_ACCEPTED = 0,
4142    #[doc = "Parameter value UNKNOWN/UNSUPPORTED"]
4143    PARAM_ACK_VALUE_UNSUPPORTED = 1,
4144    #[doc = "Parameter failed to set"]
4145    PARAM_ACK_FAILED = 2,
4146    #[doc = "Parameter value received but not yet set/accepted. A subsequent PARAM_EXT_ACK with the final result will follow once operation is completed. This is returned immediately for parameters that take longer to set, indicating that the the parameter was received and does not need to be resent."]
4147    PARAM_ACK_IN_PROGRESS = 3,
4148}
4149impl ParamAck {
4150    pub const DEFAULT: Self = Self::PARAM_ACK_ACCEPTED;
4151}
4152impl Default for ParamAck {
4153    fn default() -> Self {
4154        Self::DEFAULT
4155    }
4156}
4157bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 9 is set the floats afx afy afz should be interpreted as force instead of acceleration."] pub struct PositionTargetTypemask : u16 { # [doc = "Ignore position x"] const POSITION_TARGET_TYPEMASK_X_IGNORE = 1 ; # [doc = "Ignore position y"] const POSITION_TARGET_TYPEMASK_Y_IGNORE = 2 ; # [doc = "Ignore position z"] const POSITION_TARGET_TYPEMASK_Z_IGNORE = 4 ; # [doc = "Ignore velocity x"] const POSITION_TARGET_TYPEMASK_VX_IGNORE = 8 ; # [doc = "Ignore velocity y"] const POSITION_TARGET_TYPEMASK_VY_IGNORE = 16 ; # [doc = "Ignore velocity z"] const POSITION_TARGET_TYPEMASK_VZ_IGNORE = 32 ; # [doc = "Ignore acceleration x"] const POSITION_TARGET_TYPEMASK_AX_IGNORE = 64 ; # [doc = "Ignore acceleration y"] const POSITION_TARGET_TYPEMASK_AY_IGNORE = 128 ; # [doc = "Ignore acceleration z"] const POSITION_TARGET_TYPEMASK_AZ_IGNORE = 256 ; # [doc = "Use force instead of acceleration"] const POSITION_TARGET_TYPEMASK_FORCE_SET = 512 ; # [doc = "Ignore yaw"] const POSITION_TARGET_TYPEMASK_YAW_IGNORE = 1024 ; # [doc = "Ignore yaw rate"] const POSITION_TARGET_TYPEMASK_YAW_RATE_IGNORE = 2048 ; } }
4158impl PositionTargetTypemask {
4159    pub const DEFAULT: Self = Self::POSITION_TARGET_TYPEMASK_X_IGNORE;
4160}
4161impl Default for PositionTargetTypemask {
4162    fn default() -> Self {
4163        Self::DEFAULT
4164    }
4165}
4166#[cfg_attr(feature = "ts", derive(TS))]
4167#[cfg_attr(feature = "ts", ts(export))]
4168#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4169#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4170#[cfg_attr(feature = "serde", serde(tag = "type"))]
4171#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4172#[repr(u32)]
4173#[doc = "Precision land modes (used in MAV_CMD_NAV_LAND)."]
4174pub enum PrecisionLandMode {
4175    #[doc = "Normal (non-precision) landing."]
4176    PRECISION_LAND_MODE_DISABLED = 0,
4177    #[doc = "Use precision landing if beacon detected when land command accepted, otherwise land normally."]
4178    PRECISION_LAND_MODE_OPPORTUNISTIC = 1,
4179    #[doc = "Use precision landing, searching for beacon if not found when land command accepted (land normally if beacon cannot be found)."]
4180    PRECISION_LAND_MODE_REQUIRED = 2,
4181}
4182impl PrecisionLandMode {
4183    pub const DEFAULT: Self = Self::PRECISION_LAND_MODE_DISABLED;
4184}
4185impl Default for PrecisionLandMode {
4186    fn default() -> Self {
4187        Self::DEFAULT
4188    }
4189}
4190#[cfg_attr(feature = "ts", derive(TS))]
4191#[cfg_attr(feature = "ts", ts(export))]
4192#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4193#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4194#[cfg_attr(feature = "serde", serde(tag = "type"))]
4195#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4196#[repr(u32)]
4197#[doc = "Actions for reading and writing plan information (mission, rally points, geofence) between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly missions are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
4198pub enum PreflightStorageMissionAction {
4199    #[doc = "Read current mission data from persistent storage"]
4200    MISSION_READ_PERSISTENT = 0,
4201    #[doc = "Write current mission data to persistent storage"]
4202    MISSION_WRITE_PERSISTENT = 1,
4203    #[doc = "Erase all mission data stored on the vehicle (both persistent and volatile storage)"]
4204    MISSION_RESET_DEFAULT = 2,
4205}
4206impl PreflightStorageMissionAction {
4207    pub const DEFAULT: Self = Self::MISSION_READ_PERSISTENT;
4208}
4209impl Default for PreflightStorageMissionAction {
4210    fn default() -> Self {
4211        Self::DEFAULT
4212    }
4213}
4214#[cfg_attr(feature = "ts", derive(TS))]
4215#[cfg_attr(feature = "ts", ts(export))]
4216#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4217#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4218#[cfg_attr(feature = "serde", serde(tag = "type"))]
4219#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4220#[repr(u32)]
4221#[doc = "Actions for reading/writing parameters between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly parameters are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
4222pub enum PreflightStorageParameterAction {
4223    #[doc = "Read all parameters from persistent storage. Replaces values in volatile storage."]
4224    PARAM_READ_PERSISTENT = 0,
4225    #[doc = "Write all parameter values to persistent storage (flash/EEPROM)"]
4226    PARAM_WRITE_PERSISTENT = 1,
4227    #[doc = "Reset all user configurable parameters to their default value (including airframe selection, sensor calibration data, safety settings, and so on). Does not reset values that contain operation counters and vehicle computed statistics."]
4228    PARAM_RESET_CONFIG_DEFAULT = 2,
4229    #[doc = "Reset only sensor calibration parameters to factory defaults (or firmware default if not available)"]
4230    PARAM_RESET_SENSOR_DEFAULT = 3,
4231    #[doc = "Reset all parameters, including operation counters, to default values"]
4232    PARAM_RESET_ALL_DEFAULT = 4,
4233}
4234impl PreflightStorageParameterAction {
4235    pub const DEFAULT: Self = Self::PARAM_READ_PERSISTENT;
4236}
4237impl Default for PreflightStorageParameterAction {
4238    fn default() -> Self {
4239        Self::DEFAULT
4240    }
4241}
4242bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "RADIO_RC_CHANNELS flags (bitmask)."] pub struct RadioRcChannelsFlags : u16 { # [doc = "Failsafe is active. The content of the RC channels data in the RADIO_RC_CHANNELS message is implementation dependent."] const RADIO_RC_CHANNELS_FLAGS_FAILSAFE = 1 ; # [doc = "Channel data may be out of date. This is set when the receiver is unable to validate incoming data from the transmitter and has therefore resent the last valid data it received."] const RADIO_RC_CHANNELS_FLAGS_OUTDATED = 2 ; } }
4243impl RadioRcChannelsFlags {
4244    pub const DEFAULT: Self = Self::RADIO_RC_CHANNELS_FLAGS_FAILSAFE;
4245}
4246impl Default for RadioRcChannelsFlags {
4247    fn default() -> Self {
4248        Self::DEFAULT
4249    }
4250}
4251#[cfg_attr(feature = "ts", derive(TS))]
4252#[cfg_attr(feature = "ts", ts(export))]
4253#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4254#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4255#[cfg_attr(feature = "serde", serde(tag = "type"))]
4256#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4257#[repr(u32)]
4258#[doc = "RC sub-type of types defined in RC_TYPE. Used in MAV_CMD_START_RX_PAIR. Ignored if value does not correspond to the set RC_TYPE."]
4259pub enum RcSubType {
4260    #[doc = "Spektrum DSM2"]
4261    RC_SUB_TYPE_SPEKTRUM_DSM2 = 0,
4262    #[doc = "Spektrum DSMX"]
4263    RC_SUB_TYPE_SPEKTRUM_DSMX = 1,
4264    #[doc = "Spektrum DSMX8"]
4265    RC_SUB_TYPE_SPEKTRUM_DSMX8 = 2,
4266}
4267impl RcSubType {
4268    pub const DEFAULT: Self = Self::RC_SUB_TYPE_SPEKTRUM_DSM2;
4269}
4270impl Default for RcSubType {
4271    fn default() -> Self {
4272        Self::DEFAULT
4273    }
4274}
4275#[cfg_attr(feature = "ts", derive(TS))]
4276#[cfg_attr(feature = "ts", ts(export))]
4277#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4278#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4279#[cfg_attr(feature = "serde", serde(tag = "type"))]
4280#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4281#[repr(u32)]
4282#[doc = "RC type. Used in MAV_CMD_START_RX_PAIR."]
4283pub enum RcType {
4284    #[doc = "Spektrum"]
4285    RC_TYPE_SPEKTRUM = 0,
4286    #[doc = "CRSF"]
4287    RC_TYPE_CRSF = 1,
4288}
4289impl RcType {
4290    pub const DEFAULT: Self = Self::RC_TYPE_SPEKTRUM;
4291}
4292impl Default for RcType {
4293    fn default() -> Self {
4294        Self::DEFAULT
4295    }
4296}
4297#[cfg_attr(feature = "ts", derive(TS))]
4298#[cfg_attr(feature = "ts", ts(export))]
4299#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4300#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4301#[cfg_attr(feature = "serde", serde(tag = "type"))]
4302#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4303#[repr(u32)]
4304#[doc = "Specifies the conditions under which the MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN command should be accepted."]
4305pub enum RebootShutdownConditions {
4306    #[doc = "Reboot/Shutdown only if allowed by safety checks, such as being landed."]
4307    REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED = 0,
4308    #[doc = "Force reboot/shutdown of the autopilot/component regardless of system state."]
4309    REBOOT_SHUTDOWN_CONDITIONS_FORCE = 20190226,
4310}
4311impl RebootShutdownConditions {
4312    pub const DEFAULT: Self = Self::REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED;
4313}
4314impl Default for RebootShutdownConditions {
4315    fn default() -> Self {
4316        Self::DEFAULT
4317    }
4318}
4319#[cfg_attr(feature = "ts", derive(TS))]
4320#[cfg_attr(feature = "ts", ts(export))]
4321#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4322#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4323#[cfg_attr(feature = "serde", serde(tag = "type"))]
4324#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4325#[repr(u32)]
4326#[doc = "RTK GPS baseline coordinate system, used for RTK corrections"]
4327pub enum RtkBaselineCoordinateSystem {
4328    #[doc = "Earth-centered, Earth-fixed"]
4329    RTK_BASELINE_COORDINATE_SYSTEM_ECEF = 0,
4330    #[doc = "RTK basestation centered, north, east, down"]
4331    RTK_BASELINE_COORDINATE_SYSTEM_NED = 1,
4332}
4333impl RtkBaselineCoordinateSystem {
4334    pub const DEFAULT: Self = Self::RTK_BASELINE_COORDINATE_SYSTEM_ECEF;
4335}
4336impl Default for RtkBaselineCoordinateSystem {
4337    fn default() -> Self {
4338        Self::DEFAULT
4339    }
4340}
4341#[cfg_attr(feature = "ts", derive(TS))]
4342#[cfg_attr(feature = "ts", ts(export))]
4343#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4344#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4345#[cfg_attr(feature = "serde", serde(tag = "type"))]
4346#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4347#[repr(u32)]
4348#[doc = "Possible safety switch states."]
4349pub enum SafetySwitchState {
4350    #[doc = "Safety switch is engaged and vehicle should be safe to approach."]
4351    SAFETY_SWITCH_STATE_SAFE = 0,
4352    #[doc = "Safety switch is NOT engaged and motors, propellers and other actuators should be considered active."]
4353    SAFETY_SWITCH_STATE_DANGEROUS = 1,
4354}
4355impl SafetySwitchState {
4356    pub const DEFAULT: Self = Self::SAFETY_SWITCH_STATE_SAFE;
4357}
4358impl Default for SafetySwitchState {
4359    fn default() -> Self {
4360        Self::DEFAULT
4361    }
4362}
4363#[cfg_attr(feature = "ts", derive(TS))]
4364#[cfg_attr(feature = "ts", ts(export))]
4365#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4366#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4367#[cfg_attr(feature = "serde", serde(tag = "type"))]
4368#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4369#[repr(u32)]
4370#[doc = "SERIAL_CONTROL device types"]
4371pub enum SerialControlDev {
4372    #[doc = "First telemetry port"]
4373    SERIAL_CONTROL_DEV_TELEM1 = 0,
4374    #[doc = "Second telemetry port"]
4375    SERIAL_CONTROL_DEV_TELEM2 = 1,
4376    #[doc = "First GPS port"]
4377    SERIAL_CONTROL_DEV_GPS1 = 2,
4378    #[doc = "Second GPS port"]
4379    SERIAL_CONTROL_DEV_GPS2 = 3,
4380    #[doc = "system shell"]
4381    SERIAL_CONTROL_DEV_SHELL = 10,
4382    #[doc = "SERIAL0"]
4383    SERIAL_CONTROL_SERIAL0 = 100,
4384    #[doc = "SERIAL1"]
4385    SERIAL_CONTROL_SERIAL1 = 101,
4386    #[doc = "SERIAL2"]
4387    SERIAL_CONTROL_SERIAL2 = 102,
4388    #[doc = "SERIAL3"]
4389    SERIAL_CONTROL_SERIAL3 = 103,
4390    #[doc = "SERIAL4"]
4391    SERIAL_CONTROL_SERIAL4 = 104,
4392    #[doc = "SERIAL5"]
4393    SERIAL_CONTROL_SERIAL5 = 105,
4394    #[doc = "SERIAL6"]
4395    SERIAL_CONTROL_SERIAL6 = 106,
4396    #[doc = "SERIAL7"]
4397    SERIAL_CONTROL_SERIAL7 = 107,
4398    #[doc = "SERIAL8"]
4399    SERIAL_CONTROL_SERIAL8 = 108,
4400    #[doc = "SERIAL9"]
4401    SERIAL_CONTROL_SERIAL9 = 109,
4402}
4403impl SerialControlDev {
4404    pub const DEFAULT: Self = Self::SERIAL_CONTROL_DEV_TELEM1;
4405}
4406impl Default for SerialControlDev {
4407    fn default() -> Self {
4408        Self::DEFAULT
4409    }
4410}
4411bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "SERIAL_CONTROL flags (bitmask)"] pub struct SerialControlFlag : u8 { # [doc = "Set if this is a reply"] const SERIAL_CONTROL_FLAG_REPLY = 1 ; # [doc = "Set if the sender wants the receiver to send a response as another SERIAL_CONTROL message"] const SERIAL_CONTROL_FLAG_RESPOND = 2 ; # [doc = "Set if access to the serial port should be removed from whatever driver is currently using it, giving exclusive access to the SERIAL_CONTROL protocol. The port can be handed back by sending a request without this flag set"] const SERIAL_CONTROL_FLAG_EXCLUSIVE = 4 ; # [doc = "Block on writes to the serial port"] const SERIAL_CONTROL_FLAG_BLOCKING = 8 ; # [doc = "Send multiple replies until port is drained"] const SERIAL_CONTROL_FLAG_MULTI = 16 ; } }
4412impl SerialControlFlag {
4413    pub const DEFAULT: Self = Self::SERIAL_CONTROL_FLAG_REPLY;
4414}
4415impl Default for SerialControlFlag {
4416    fn default() -> Self {
4417        Self::DEFAULT
4418    }
4419}
4420#[cfg_attr(feature = "ts", derive(TS))]
4421#[cfg_attr(feature = "ts", ts(export))]
4422#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4423#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4424#[cfg_attr(feature = "serde", serde(tag = "type"))]
4425#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4426#[repr(u32)]
4427#[doc = "Focus types for MAV_CMD_SET_CAMERA_FOCUS"]
4428pub enum SetFocusType {
4429    #[doc = "Focus one step increment (-1 for focusing in, 1 for focusing out towards infinity)."]
4430    FOCUS_TYPE_STEP = 0,
4431    #[doc = "Continuous normalized focus in/out rate until stopped. Range -1..1, negative: in, positive: out towards infinity, 0 to stop focusing. Other values should be clipped to the range."]
4432    FOCUS_TYPE_CONTINUOUS = 1,
4433    #[doc = "Focus value as proportion of full camera focus range (a value between 0.0 and 100.0)"]
4434    FOCUS_TYPE_RANGE = 2,
4435    #[doc = "Focus value in metres. Note that there is no message to get the valid focus range of the camera, so this can type can only be used for cameras where the range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)."]
4436    FOCUS_TYPE_METERS = 3,
4437    #[doc = "Focus automatically."]
4438    FOCUS_TYPE_AUTO = 4,
4439    #[doc = "Single auto focus. Mainly used for still pictures. Usually abbreviated as AF-S."]
4440    FOCUS_TYPE_AUTO_SINGLE = 5,
4441    #[doc = "Continuous auto focus. Mainly used for dynamic scenes. Abbreviated as AF-C."]
4442    FOCUS_TYPE_AUTO_CONTINUOUS = 6,
4443}
4444impl SetFocusType {
4445    pub const DEFAULT: Self = Self::FOCUS_TYPE_STEP;
4446}
4447impl Default for SetFocusType {
4448    fn default() -> Self {
4449        Self::DEFAULT
4450    }
4451}
4452#[cfg_attr(feature = "ts", derive(TS))]
4453#[cfg_attr(feature = "ts", ts(export))]
4454#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4455#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4456#[cfg_attr(feature = "serde", serde(tag = "type"))]
4457#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4458#[repr(u32)]
4459#[doc = "Speed setpoint types used in MAV_CMD_DO_CHANGE_SPEED"]
4460pub enum SpeedType {
4461    #[doc = "Airspeed"]
4462    SPEED_TYPE_AIRSPEED = 0,
4463    #[doc = "Groundspeed"]
4464    SPEED_TYPE_GROUNDSPEED = 1,
4465    #[doc = "Climb speed"]
4466    SPEED_TYPE_CLIMB_SPEED = 2,
4467    #[doc = "Descent speed"]
4468    SPEED_TYPE_DESCENT_SPEED = 3,
4469}
4470impl SpeedType {
4471    pub const DEFAULT: Self = Self::SPEED_TYPE_AIRSPEED;
4472}
4473impl Default for SpeedType {
4474    fn default() -> Self {
4475        Self::DEFAULT
4476    }
4477}
4478#[cfg_attr(feature = "ts", derive(TS))]
4479#[cfg_attr(feature = "ts", ts(export))]
4480#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4481#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4482#[cfg_attr(feature = "serde", serde(tag = "type"))]
4483#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4484#[repr(u32)]
4485#[doc = "Flags to indicate the status of camera storage."]
4486pub enum StorageStatus {
4487    #[doc = "Storage is missing (no microSD card loaded for example.)"]
4488    STORAGE_STATUS_EMPTY = 0,
4489    #[doc = "Storage present but unformatted."]
4490    STORAGE_STATUS_UNFORMATTED = 1,
4491    #[doc = "Storage present and ready."]
4492    STORAGE_STATUS_READY = 2,
4493    #[doc = "Camera does not supply storage status information. Capacity information in STORAGE_INFORMATION fields will be ignored."]
4494    STORAGE_STATUS_NOT_SUPPORTED = 3,
4495}
4496impl StorageStatus {
4497    pub const DEFAULT: Self = Self::STORAGE_STATUS_EMPTY;
4498}
4499impl Default for StorageStatus {
4500    fn default() -> Self {
4501        Self::DEFAULT
4502    }
4503}
4504#[cfg_attr(feature = "ts", derive(TS))]
4505#[cfg_attr(feature = "ts", ts(export))]
4506#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4507#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4508#[cfg_attr(feature = "serde", serde(tag = "type"))]
4509#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4510#[repr(u32)]
4511#[doc = "Flags to indicate the type of storage."]
4512pub enum StorageType {
4513    #[doc = "Storage type is not known."]
4514    STORAGE_TYPE_UNKNOWN = 0,
4515    #[doc = "Storage type is USB device."]
4516    STORAGE_TYPE_USB_STICK = 1,
4517    #[doc = "Storage type is SD card."]
4518    STORAGE_TYPE_SD = 2,
4519    #[doc = "Storage type is microSD card."]
4520    STORAGE_TYPE_MICROSD = 3,
4521    #[doc = "Storage type is CFast."]
4522    STORAGE_TYPE_CF = 4,
4523    #[doc = "Storage type is CFexpress."]
4524    STORAGE_TYPE_CFE = 5,
4525    #[doc = "Storage type is XQD."]
4526    STORAGE_TYPE_XQD = 6,
4527    #[doc = "Storage type is HD mass storage type."]
4528    STORAGE_TYPE_HD = 7,
4529    #[doc = "Storage type is other, not listed type."]
4530    STORAGE_TYPE_OTHER = 254,
4531}
4532impl StorageType {
4533    pub const DEFAULT: Self = Self::STORAGE_TYPE_UNKNOWN;
4534}
4535impl Default for StorageType {
4536    fn default() -> Self {
4537        Self::DEFAULT
4538    }
4539}
4540bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to indicate usage for a particular storage (see STORAGE_INFORMATION.storage_usage and MAV_CMD_SET_STORAGE_USAGE)."] pub struct StorageUsageFlag : u8 { # [doc = "Always set to 1 (indicates STORAGE_INFORMATION.storage_usage is supported)."] const STORAGE_USAGE_FLAG_SET = 1 ; # [doc = "Storage for saving photos."] const STORAGE_USAGE_FLAG_PHOTO = 2 ; # [doc = "Storage for saving videos."] const STORAGE_USAGE_FLAG_VIDEO = 4 ; # [doc = "Storage for saving logs."] const STORAGE_USAGE_FLAG_LOGS = 8 ; } }
4541impl StorageUsageFlag {
4542    pub const DEFAULT: Self = Self::STORAGE_USAGE_FLAG_SET;
4543}
4544impl Default for StorageUsageFlag {
4545    fn default() -> Self {
4546        Self::DEFAULT
4547    }
4548}
4549bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags indicate the sensor reporting capabilities for TARGET_ABSOLUTE."] pub struct TargetAbsoluteSensorCapabilityFlags : u8 { const TARGET_ABSOLUTE_SENSOR_CAPABILITY_POSITION = 1 ; const TARGET_ABSOLUTE_SENSOR_CAPABILITY_VELOCITY = 2 ; const TARGET_ABSOLUTE_SENSOR_CAPABILITY_ACCELERATION = 4 ; const TARGET_ABSOLUTE_SENSOR_CAPABILITY_ATTITUDE = 8 ; const TARGET_ABSOLUTE_SENSOR_CAPABILITY_RATES = 16 ; } }
4550impl TargetAbsoluteSensorCapabilityFlags {
4551    pub const DEFAULT: Self = Self::TARGET_ABSOLUTE_SENSOR_CAPABILITY_POSITION;
4552}
4553impl Default for TargetAbsoluteSensorCapabilityFlags {
4554    fn default() -> Self {
4555        Self::DEFAULT
4556    }
4557}
4558#[cfg_attr(feature = "ts", derive(TS))]
4559#[cfg_attr(feature = "ts", ts(export))]
4560#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4561#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4562#[cfg_attr(feature = "serde", serde(tag = "type"))]
4563#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4564#[repr(u32)]
4565#[doc = "The frame of a target observation from an onboard sensor."]
4566pub enum TargetObsFrame {
4567    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin fixed relative to earth."]
4568    TARGET_OBS_FRAME_LOCAL_NED = 0,
4569    #[doc = "FRD local frame aligned to the vehicle's attitude (x: Forward, y: Right, z: Down) with an origin that travels with vehicle."]
4570    TARGET_OBS_FRAME_BODY_FRD = 1,
4571    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with an origin that travels with vehicle."]
4572    TARGET_OBS_FRAME_LOCAL_OFFSET_NED = 2,
4573    #[doc = "Other sensor frame for target observations neither in local NED nor in body FRD."]
4574    TARGET_OBS_FRAME_OTHER = 3,
4575}
4576impl TargetObsFrame {
4577    pub const DEFAULT: Self = Self::TARGET_OBS_FRAME_LOCAL_NED;
4578}
4579impl Default for TargetObsFrame {
4580    fn default() -> Self {
4581        Self::DEFAULT
4582    }
4583}
4584#[cfg_attr(feature = "ts", derive(TS))]
4585#[cfg_attr(feature = "ts", ts(export))]
4586#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4587#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4588#[cfg_attr(feature = "serde", serde(tag = "type"))]
4589#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4590#[repr(u32)]
4591#[doc = "Tune formats (used for vehicle buzzer/tone generation)."]
4592pub enum TuneFormat {
4593    #[doc = "Format is QBasic 1.1 Play: <https://www.qbasic.net/en/reference/qb11/Statement/PLAY-006.htm>."]
4594    TUNE_FORMAT_QBASIC1_1 = 1,
4595    #[doc = "Format is Modern Music Markup Language (MML): <https://en.wikipedia.org/wiki/Music_Macro_Language#Modern_MML>."]
4596    TUNE_FORMAT_MML_MODERN = 2,
4597}
4598impl TuneFormat {
4599    pub const DEFAULT: Self = Self::TUNE_FORMAT_QBASIC1_1;
4600}
4601impl Default for TuneFormat {
4602    fn default() -> Self {
4603        Self::DEFAULT
4604    }
4605}
4606#[cfg_attr(feature = "ts", derive(TS))]
4607#[cfg_attr(feature = "ts", ts(export))]
4608#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4609#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4610#[cfg_attr(feature = "serde", serde(tag = "type"))]
4611#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4612#[repr(u32)]
4613#[doc = "Generalized UAVCAN node health"]
4614pub enum UavcanNodeHealth {
4615    #[doc = "The node is functioning properly."]
4616    UAVCAN_NODE_HEALTH_OK = 0,
4617    #[doc = "A critical parameter went out of range or the node has encountered a minor failure."]
4618    UAVCAN_NODE_HEALTH_WARNING = 1,
4619    #[doc = "The node has encountered a major failure."]
4620    UAVCAN_NODE_HEALTH_ERROR = 2,
4621    #[doc = "The node has suffered a fatal malfunction."]
4622    UAVCAN_NODE_HEALTH_CRITICAL = 3,
4623}
4624impl UavcanNodeHealth {
4625    pub const DEFAULT: Self = Self::UAVCAN_NODE_HEALTH_OK;
4626}
4627impl Default for UavcanNodeHealth {
4628    fn default() -> Self {
4629        Self::DEFAULT
4630    }
4631}
4632#[cfg_attr(feature = "ts", derive(TS))]
4633#[cfg_attr(feature = "ts", ts(export))]
4634#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4635#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4636#[cfg_attr(feature = "serde", serde(tag = "type"))]
4637#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4638#[repr(u32)]
4639#[doc = "Generalized UAVCAN node mode"]
4640pub enum UavcanNodeMode {
4641    #[doc = "The node is performing its primary functions."]
4642    UAVCAN_NODE_MODE_OPERATIONAL = 0,
4643    #[doc = "The node is initializing; this mode is entered immediately after startup."]
4644    UAVCAN_NODE_MODE_INITIALIZATION = 1,
4645    #[doc = "The node is under maintenance."]
4646    UAVCAN_NODE_MODE_MAINTENANCE = 2,
4647    #[doc = "The node is in the process of updating its software."]
4648    UAVCAN_NODE_MODE_SOFTWARE_UPDATE = 3,
4649    #[doc = "The node is no longer available online."]
4650    UAVCAN_NODE_MODE_OFFLINE = 7,
4651}
4652impl UavcanNodeMode {
4653    pub const DEFAULT: Self = Self::UAVCAN_NODE_MODE_OPERATIONAL;
4654}
4655impl Default for UavcanNodeMode {
4656    fn default() -> Self {
4657        Self::DEFAULT
4658    }
4659}
4660bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for the global position report."] pub struct UtmDataAvailFlags : u8 { # [doc = "The field time contains valid data."] const UTM_DATA_AVAIL_FLAGS_TIME_VALID = 1 ; # [doc = "The field uas_id contains valid data."] const UTM_DATA_AVAIL_FLAGS_UAS_ID_AVAILABLE = 2 ; # [doc = "The fields lat, lon and h_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_POSITION_AVAILABLE = 4 ; # [doc = "The fields alt and v_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_ALTITUDE_AVAILABLE = 8 ; # [doc = "The field relative_alt contains valid data."] const UTM_DATA_AVAIL_FLAGS_RELATIVE_ALTITUDE_AVAILABLE = 16 ; # [doc = "The fields vx and vy contain valid data."] const UTM_DATA_AVAIL_FLAGS_HORIZONTAL_VELO_AVAILABLE = 32 ; # [doc = "The field vz contains valid data."] const UTM_DATA_AVAIL_FLAGS_VERTICAL_VELO_AVAILABLE = 64 ; # [doc = "The fields next_lat, next_lon and next_alt contain valid data."] const UTM_DATA_AVAIL_FLAGS_NEXT_WAYPOINT_AVAILABLE = 128 ; } }
4661impl UtmDataAvailFlags {
4662    pub const DEFAULT: Self = Self::UTM_DATA_AVAIL_FLAGS_TIME_VALID;
4663}
4664impl Default for UtmDataAvailFlags {
4665    fn default() -> Self {
4666        Self::DEFAULT
4667    }
4668}
4669#[cfg_attr(feature = "ts", derive(TS))]
4670#[cfg_attr(feature = "ts", ts(export))]
4671#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4672#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4673#[cfg_attr(feature = "serde", serde(tag = "type"))]
4674#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4675#[repr(u32)]
4676#[doc = "Airborne status of UAS."]
4677pub enum UtmFlightState {
4678    #[doc = "The flight state can't be determined."]
4679    UTM_FLIGHT_STATE_UNKNOWN = 1,
4680    #[doc = "UAS on ground."]
4681    UTM_FLIGHT_STATE_GROUND = 2,
4682    #[doc = "UAS airborne."]
4683    UTM_FLIGHT_STATE_AIRBORNE = 3,
4684    #[doc = "UAS is in an emergency flight state."]
4685    UTM_FLIGHT_STATE_EMERGENCY = 16,
4686    #[doc = "UAS has no active controls."]
4687    UTM_FLIGHT_STATE_NOCTRL = 32,
4688}
4689impl UtmFlightState {
4690    pub const DEFAULT: Self = Self::UTM_FLIGHT_STATE_UNKNOWN;
4691}
4692impl Default for UtmFlightState {
4693    fn default() -> Self {
4694        Self::DEFAULT
4695    }
4696}
4697#[cfg_attr(feature = "ts", derive(TS))]
4698#[cfg_attr(feature = "ts", ts(export))]
4699#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4700#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4701#[cfg_attr(feature = "serde", serde(tag = "type"))]
4702#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4703#[repr(u32)]
4704#[doc = "Video stream encodings"]
4705pub enum VideoStreamEncoding {
4706    #[doc = "Stream encoding is unknown"]
4707    VIDEO_STREAM_ENCODING_UNKNOWN = 0,
4708    #[doc = "Stream encoding is H.264"]
4709    VIDEO_STREAM_ENCODING_H264 = 1,
4710    #[doc = "Stream encoding is H.265"]
4711    VIDEO_STREAM_ENCODING_H265 = 2,
4712}
4713impl VideoStreamEncoding {
4714    pub const DEFAULT: Self = Self::VIDEO_STREAM_ENCODING_UNKNOWN;
4715}
4716impl Default for VideoStreamEncoding {
4717    fn default() -> Self {
4718        Self::DEFAULT
4719    }
4720}
4721bitflags! { # [cfg_attr (feature = "ts" , derive (TS))] # [cfg_attr (feature = "ts" , ts (export , type = "number"))] # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Stream status flags (Bitmap)"] pub struct VideoStreamStatusFlags : u16 { # [doc = "Stream is active (running)"] const VIDEO_STREAM_STATUS_FLAGS_RUNNING = 1 ; # [doc = "Stream is thermal imaging"] const VIDEO_STREAM_STATUS_FLAGS_THERMAL = 2 ; # [doc = "Stream can report absolute thermal range (see CAMERA_THERMAL_RANGE)."] const VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED = 4 ; } }
4722impl VideoStreamStatusFlags {
4723    pub const DEFAULT: Self = Self::VIDEO_STREAM_STATUS_FLAGS_RUNNING;
4724}
4725impl Default for VideoStreamStatusFlags {
4726    fn default() -> Self {
4727        Self::DEFAULT
4728    }
4729}
4730#[cfg_attr(feature = "ts", derive(TS))]
4731#[cfg_attr(feature = "ts", ts(export))]
4732#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4733#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4734#[cfg_attr(feature = "serde", serde(tag = "type"))]
4735#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4736#[repr(u32)]
4737#[doc = "Video stream types"]
4738pub enum VideoStreamType {
4739    #[doc = "Stream is RTSP"]
4740    VIDEO_STREAM_TYPE_RTSP = 0,
4741    #[doc = "Stream is RTP UDP (URI gives the port number)"]
4742    VIDEO_STREAM_TYPE_RTPUDP = 1,
4743    #[doc = "Stream is MPEG on TCP"]
4744    VIDEO_STREAM_TYPE_TCP_MPEG = 2,
4745    #[doc = "Stream is MPEG TS (URI gives the port number)"]
4746    VIDEO_STREAM_TYPE_MPEG_TS = 3,
4747}
4748impl VideoStreamType {
4749    pub const DEFAULT: Self = Self::VIDEO_STREAM_TYPE_RTSP;
4750}
4751impl Default for VideoStreamType {
4752    fn default() -> Self {
4753        Self::DEFAULT
4754    }
4755}
4756#[cfg_attr(feature = "ts", derive(TS))]
4757#[cfg_attr(feature = "ts", ts(export))]
4758#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4759#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4760#[cfg_attr(feature = "serde", serde(tag = "type"))]
4761#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4762#[repr(u32)]
4763#[doc = "Direction of VTOL transition"]
4764pub enum VtolTransitionHeading {
4765    #[doc = "Respect the heading configuration of the vehicle."]
4766    VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT = 0,
4767    #[doc = "Use the heading pointing towards the next waypoint."]
4768    VTOL_TRANSITION_HEADING_NEXT_WAYPOINT = 1,
4769    #[doc = "Use the heading on takeoff (while sitting on the ground)."]
4770    VTOL_TRANSITION_HEADING_TAKEOFF = 2,
4771    #[doc = "Use the specified heading in parameter 4."]
4772    VTOL_TRANSITION_HEADING_SPECIFIED = 3,
4773    #[doc = "Use the current heading when reaching takeoff altitude (potentially facing the wind when weather-vaning is active)."]
4774    VTOL_TRANSITION_HEADING_ANY = 4,
4775}
4776impl VtolTransitionHeading {
4777    pub const DEFAULT: Self = Self::VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT;
4778}
4779impl Default for VtolTransitionHeading {
4780    fn default() -> Self {
4781        Self::DEFAULT
4782    }
4783}
4784#[cfg_attr(feature = "ts", derive(TS))]
4785#[cfg_attr(feature = "ts", ts(export))]
4786#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4787#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4788#[cfg_attr(feature = "serde", serde(tag = "type"))]
4789#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4790#[repr(u32)]
4791#[doc = "WiFi Mode."]
4792pub enum WifiConfigApMode {
4793    #[doc = "WiFi mode is undefined."]
4794    WIFI_CONFIG_AP_MODE_UNDEFINED = 0,
4795    #[doc = "WiFi configured as an access point."]
4796    WIFI_CONFIG_AP_MODE_AP = 1,
4797    #[doc = "WiFi configured as a station connected to an existing local WiFi network."]
4798    WIFI_CONFIG_AP_MODE_STATION = 2,
4799    #[doc = "WiFi disabled."]
4800    WIFI_CONFIG_AP_MODE_DISABLED = 3,
4801}
4802impl WifiConfigApMode {
4803    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_MODE_UNDEFINED;
4804}
4805impl Default for WifiConfigApMode {
4806    fn default() -> Self {
4807        Self::DEFAULT
4808    }
4809}
4810#[cfg_attr(feature = "ts", derive(TS))]
4811#[cfg_attr(feature = "ts", ts(export))]
4812#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4813#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4814#[cfg_attr(feature = "serde", serde(tag = "type"))]
4815#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4816#[repr(u32)]
4817#[doc = "Possible responses from a WIFI_CONFIG_AP message."]
4818pub enum WifiConfigApResponse {
4819    #[doc = "Undefined response. Likely an indicative of a system that doesn't support this request."]
4820    WIFI_CONFIG_AP_RESPONSE_UNDEFINED = 0,
4821    #[doc = "Changes accepted."]
4822    WIFI_CONFIG_AP_RESPONSE_ACCEPTED = 1,
4823    #[doc = "Changes rejected."]
4824    WIFI_CONFIG_AP_RESPONSE_REJECTED = 2,
4825    #[doc = "Invalid Mode."]
4826    WIFI_CONFIG_AP_RESPONSE_MODE_ERROR = 3,
4827    #[doc = "Invalid SSID."]
4828    WIFI_CONFIG_AP_RESPONSE_SSID_ERROR = 4,
4829    #[doc = "Invalid Password."]
4830    WIFI_CONFIG_AP_RESPONSE_PASSWORD_ERROR = 5,
4831}
4832impl WifiConfigApResponse {
4833    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_RESPONSE_UNDEFINED;
4834}
4835impl Default for WifiConfigApResponse {
4836    fn default() -> Self {
4837        Self::DEFAULT
4838    }
4839}
4840#[cfg_attr(feature = "ts", derive(TS))]
4841#[cfg_attr(feature = "ts", ts(export))]
4842#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4843#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4844#[cfg_attr(feature = "serde", serde(tag = "type"))]
4845#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4846#[repr(u32)]
4847#[doc = "Winch actions."]
4848pub enum WinchActions {
4849    #[doc = "Allow motor to freewheel."]
4850    WINCH_RELAXED = 0,
4851    #[doc = "Wind or unwind specified length of line, optionally using specified rate."]
4852    WINCH_RELATIVE_LENGTH_CONTROL = 1,
4853    #[doc = "Wind or unwind line at specified rate."]
4854    WINCH_RATE_CONTROL = 2,
4855    #[doc = "Perform the locking sequence to relieve motor while in the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4856    WINCH_LOCK = 3,
4857    #[doc = "Sequence of drop, slow down, touch down, reel up, lock. Only action and instance command parameters are used, others are ignored."]
4858    WINCH_DELIVER = 4,
4859    #[doc = "Engage motor and hold current position. Only action and instance command parameters are used, others are ignored."]
4860    WINCH_HOLD = 5,
4861    #[doc = "Return the reel to the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4862    WINCH_RETRACT = 6,
4863    #[doc = "Load the reel with line. The winch will calculate the total loaded length and stop when the tension exceeds a threshold. Only action and instance command parameters are used, others are ignored."]
4864    WINCH_LOAD_LINE = 7,
4865    #[doc = "Spool out the entire length of the line. Only action and instance command parameters are used, others are ignored."]
4866    WINCH_ABANDON_LINE = 8,
4867    #[doc = "Spools out just enough to present the hook to the user to load the payload. Only action and instance command parameters are used, others are ignored"]
4868    WINCH_LOAD_PAYLOAD = 9,
4869}
4870impl WinchActions {
4871    pub const DEFAULT: Self = Self::WINCH_RELAXED;
4872}
4873impl Default for WinchActions {
4874    fn default() -> Self {
4875        Self::DEFAULT
4876    }
4877}
4878#[doc = "Set the vehicle attitude and body angular rates."]
4879#[doc = ""]
4880#[doc = "ID: 140"]
4881#[derive(Debug, Clone, PartialEq)]
4882#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4883#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4884#[cfg_attr(feature = "ts", derive(TS))]
4885#[cfg_attr(feature = "ts", ts(export))]
4886pub struct ACTUATOR_CONTROL_TARGET_DATA {
4887    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
4888    pub time_usec: u64,
4889    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
4890    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4891    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
4892    pub controls: [f32; 8],
4893    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
4894    pub group_mlx: u8,
4895}
4896impl ACTUATOR_CONTROL_TARGET_DATA {
4897    pub const ENCODED_LEN: usize = 41usize;
4898    pub const DEFAULT: Self = Self {
4899        time_usec: 0_u64,
4900        controls: [0.0_f32; 8usize],
4901        group_mlx: 0_u8,
4902    };
4903    #[cfg(feature = "arbitrary")]
4904    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4905        use arbitrary::{Arbitrary, Unstructured};
4906        let mut buf = [0u8; 1024];
4907        rng.fill_bytes(&mut buf);
4908        let mut unstructured = Unstructured::new(&buf);
4909        Self::arbitrary(&mut unstructured).unwrap_or_default()
4910    }
4911}
4912impl Default for ACTUATOR_CONTROL_TARGET_DATA {
4913    fn default() -> Self {
4914        Self::DEFAULT.clone()
4915    }
4916}
4917impl MessageData for ACTUATOR_CONTROL_TARGET_DATA {
4918    type Message = MavMessage;
4919    const ID: u32 = 140u32;
4920    const NAME: &'static str = "ACTUATOR_CONTROL_TARGET";
4921    const EXTRA_CRC: u8 = 181u8;
4922    const ENCODED_LEN: usize = 41usize;
4923    fn deser(
4924        _version: MavlinkVersion,
4925        __input: &[u8],
4926    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4927        let avail_len = __input.len();
4928        let mut payload_buf = [0; Self::ENCODED_LEN];
4929        let mut buf = if avail_len < Self::ENCODED_LEN {
4930            payload_buf[0..avail_len].copy_from_slice(__input);
4931            Bytes::new(&payload_buf)
4932        } else {
4933            Bytes::new(__input)
4934        };
4935        let mut __struct = Self::default();
4936        __struct.time_usec = buf.get_u64_le()?;
4937        for v in &mut __struct.controls {
4938            let val = buf.get_f32_le()?;
4939            *v = val;
4940        }
4941        __struct.group_mlx = buf.get_u8()?;
4942        Ok(__struct)
4943    }
4944    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4945        let mut __tmp = BytesMut::new(bytes);
4946        #[allow(clippy::absurd_extreme_comparisons)]
4947        #[allow(unused_comparisons)]
4948        if __tmp.remaining() < Self::ENCODED_LEN {
4949            panic!(
4950                "buffer is too small (need {} bytes, but got {})",
4951                Self::ENCODED_LEN,
4952                __tmp.remaining(),
4953            )
4954        }
4955        __tmp.put_u64_le(self.time_usec);
4956        for val in &self.controls {
4957            __tmp.put_f32_le(*val);
4958        }
4959        __tmp.put_u8(self.group_mlx);
4960        if matches!(version, MavlinkVersion::V2) {
4961            let len = __tmp.len();
4962            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4963        } else {
4964            __tmp.len()
4965        }
4966    }
4967}
4968#[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
4969#[doc = ""]
4970#[doc = "ID: 375"]
4971#[derive(Debug, Clone, PartialEq)]
4972#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4973#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4974#[cfg_attr(feature = "ts", derive(TS))]
4975#[cfg_attr(feature = "ts", ts(export))]
4976pub struct ACTUATOR_OUTPUT_STATUS_DATA {
4977    #[doc = "Timestamp (since system boot)."]
4978    pub time_usec: u64,
4979    #[doc = "Active outputs"]
4980    pub active: u32,
4981    #[doc = "Servo / motor output array values. Zero values indicate unused channels."]
4982    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4983    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
4984    pub actuator: [f32; 32],
4985}
4986impl ACTUATOR_OUTPUT_STATUS_DATA {
4987    pub const ENCODED_LEN: usize = 140usize;
4988    pub const DEFAULT: Self = Self {
4989        time_usec: 0_u64,
4990        active: 0_u32,
4991        actuator: [0.0_f32; 32usize],
4992    };
4993    #[cfg(feature = "arbitrary")]
4994    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4995        use arbitrary::{Arbitrary, Unstructured};
4996        let mut buf = [0u8; 1024];
4997        rng.fill_bytes(&mut buf);
4998        let mut unstructured = Unstructured::new(&buf);
4999        Self::arbitrary(&mut unstructured).unwrap_or_default()
5000    }
5001}
5002impl Default for ACTUATOR_OUTPUT_STATUS_DATA {
5003    fn default() -> Self {
5004        Self::DEFAULT.clone()
5005    }
5006}
5007impl MessageData for ACTUATOR_OUTPUT_STATUS_DATA {
5008    type Message = MavMessage;
5009    const ID: u32 = 375u32;
5010    const NAME: &'static str = "ACTUATOR_OUTPUT_STATUS";
5011    const EXTRA_CRC: u8 = 251u8;
5012    const ENCODED_LEN: usize = 140usize;
5013    fn deser(
5014        _version: MavlinkVersion,
5015        __input: &[u8],
5016    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5017        let avail_len = __input.len();
5018        let mut payload_buf = [0; Self::ENCODED_LEN];
5019        let mut buf = if avail_len < Self::ENCODED_LEN {
5020            payload_buf[0..avail_len].copy_from_slice(__input);
5021            Bytes::new(&payload_buf)
5022        } else {
5023            Bytes::new(__input)
5024        };
5025        let mut __struct = Self::default();
5026        __struct.time_usec = buf.get_u64_le()?;
5027        __struct.active = buf.get_u32_le()?;
5028        for v in &mut __struct.actuator {
5029            let val = buf.get_f32_le()?;
5030            *v = val;
5031        }
5032        Ok(__struct)
5033    }
5034    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5035        let mut __tmp = BytesMut::new(bytes);
5036        #[allow(clippy::absurd_extreme_comparisons)]
5037        #[allow(unused_comparisons)]
5038        if __tmp.remaining() < Self::ENCODED_LEN {
5039            panic!(
5040                "buffer is too small (need {} bytes, but got {})",
5041                Self::ENCODED_LEN,
5042                __tmp.remaining(),
5043            )
5044        }
5045        __tmp.put_u64_le(self.time_usec);
5046        __tmp.put_u32_le(self.active);
5047        for val in &self.actuator {
5048            __tmp.put_f32_le(*val);
5049        }
5050        if matches!(version, MavlinkVersion::V2) {
5051            let len = __tmp.len();
5052            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5053        } else {
5054            __tmp.len()
5055        }
5056    }
5057}
5058#[doc = "The location and information of an ADSB vehicle."]
5059#[doc = ""]
5060#[doc = "ID: 246"]
5061#[derive(Debug, Clone, PartialEq)]
5062#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5063#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5064#[cfg_attr(feature = "ts", derive(TS))]
5065#[cfg_attr(feature = "ts", ts(export))]
5066pub struct ADSB_VEHICLE_DATA {
5067    #[doc = "ICAO address"]
5068    pub ICAO_address: u32,
5069    #[doc = "Latitude"]
5070    pub lat: i32,
5071    #[doc = "Longitude"]
5072    pub lon: i32,
5073    #[doc = "Altitude(ASL)"]
5074    pub altitude: i32,
5075    #[doc = "Course over ground"]
5076    pub heading: u16,
5077    #[doc = "The horizontal velocity"]
5078    pub hor_velocity: u16,
5079    #[doc = "The vertical velocity. Positive is up"]
5080    pub ver_velocity: i16,
5081    #[doc = "Bitmap to indicate various statuses including valid data fields"]
5082    pub flags: AdsbFlags,
5083    #[doc = "Squawk code. Note that the code is in decimal: e.g. 7700 (general emergency) is encoded as binary 0b0001_1110_0001_0100, not(!) as 0b0000_111_111_000_000"]
5084    pub squawk: u16,
5085    #[doc = "ADSB altitude type."]
5086    pub altitude_type: AdsbAltitudeType,
5087    #[doc = "The callsign, 8+null"]
5088    #[cfg_attr(feature = "ts", ts(type = "string"))]
5089    pub callsign: CharArray<9>,
5090    #[doc = "ADSB emitter type."]
5091    pub emitter_type: AdsbEmitterType,
5092    #[doc = "Time since last communication in seconds"]
5093    pub tslc: u8,
5094}
5095impl ADSB_VEHICLE_DATA {
5096    pub const ENCODED_LEN: usize = 38usize;
5097    pub const DEFAULT: Self = Self {
5098        ICAO_address: 0_u32,
5099        lat: 0_i32,
5100        lon: 0_i32,
5101        altitude: 0_i32,
5102        heading: 0_u16,
5103        hor_velocity: 0_u16,
5104        ver_velocity: 0_i16,
5105        flags: AdsbFlags::DEFAULT,
5106        squawk: 0_u16,
5107        altitude_type: AdsbAltitudeType::DEFAULT,
5108        callsign: CharArray::new([0_u8; 9usize]),
5109        emitter_type: AdsbEmitterType::DEFAULT,
5110        tslc: 0_u8,
5111    };
5112    #[cfg(feature = "arbitrary")]
5113    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5114        use arbitrary::{Arbitrary, Unstructured};
5115        let mut buf = [0u8; 1024];
5116        rng.fill_bytes(&mut buf);
5117        let mut unstructured = Unstructured::new(&buf);
5118        Self::arbitrary(&mut unstructured).unwrap_or_default()
5119    }
5120}
5121impl Default for ADSB_VEHICLE_DATA {
5122    fn default() -> Self {
5123        Self::DEFAULT.clone()
5124    }
5125}
5126impl MessageData for ADSB_VEHICLE_DATA {
5127    type Message = MavMessage;
5128    const ID: u32 = 246u32;
5129    const NAME: &'static str = "ADSB_VEHICLE";
5130    const EXTRA_CRC: u8 = 184u8;
5131    const ENCODED_LEN: usize = 38usize;
5132    fn deser(
5133        _version: MavlinkVersion,
5134        __input: &[u8],
5135    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5136        let avail_len = __input.len();
5137        let mut payload_buf = [0; Self::ENCODED_LEN];
5138        let mut buf = if avail_len < Self::ENCODED_LEN {
5139            payload_buf[0..avail_len].copy_from_slice(__input);
5140            Bytes::new(&payload_buf)
5141        } else {
5142            Bytes::new(__input)
5143        };
5144        let mut __struct = Self::default();
5145        __struct.ICAO_address = buf.get_u32_le()?;
5146        __struct.lat = buf.get_i32_le()?;
5147        __struct.lon = buf.get_i32_le()?;
5148        __struct.altitude = buf.get_i32_le()?;
5149        __struct.heading = buf.get_u16_le()?;
5150        __struct.hor_velocity = buf.get_u16_le()?;
5151        __struct.ver_velocity = buf.get_i16_le()?;
5152        let tmp = buf.get_u16_le()?;
5153        __struct.flags = AdsbFlags::from_bits(tmp as <AdsbFlags as Flags>::Bits).ok_or(
5154            ::mavlink_core::error::ParserError::InvalidFlag {
5155                flag_type: "AdsbFlags",
5156                value: tmp as u64,
5157            },
5158        )?;
5159        __struct.squawk = buf.get_u16_le()?;
5160        let tmp = buf.get_u8()?;
5161        __struct.altitude_type =
5162            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5163                enum_type: "AdsbAltitudeType",
5164                value: tmp as u64,
5165            })?;
5166        let mut tmp = [0_u8; 9usize];
5167        for v in &mut tmp {
5168            *v = buf.get_u8()?;
5169        }
5170        __struct.callsign = CharArray::new(tmp);
5171        let tmp = buf.get_u8()?;
5172        __struct.emitter_type =
5173            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5174                enum_type: "AdsbEmitterType",
5175                value: tmp as u64,
5176            })?;
5177        __struct.tslc = buf.get_u8()?;
5178        Ok(__struct)
5179    }
5180    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5181        let mut __tmp = BytesMut::new(bytes);
5182        #[allow(clippy::absurd_extreme_comparisons)]
5183        #[allow(unused_comparisons)]
5184        if __tmp.remaining() < Self::ENCODED_LEN {
5185            panic!(
5186                "buffer is too small (need {} bytes, but got {})",
5187                Self::ENCODED_LEN,
5188                __tmp.remaining(),
5189            )
5190        }
5191        __tmp.put_u32_le(self.ICAO_address);
5192        __tmp.put_i32_le(self.lat);
5193        __tmp.put_i32_le(self.lon);
5194        __tmp.put_i32_le(self.altitude);
5195        __tmp.put_u16_le(self.heading);
5196        __tmp.put_u16_le(self.hor_velocity);
5197        __tmp.put_i16_le(self.ver_velocity);
5198        __tmp.put_u16_le(self.flags.bits() as u16);
5199        __tmp.put_u16_le(self.squawk);
5200        __tmp.put_u8(self.altitude_type as u8);
5201        for val in &self.callsign {
5202            __tmp.put_u8(*val);
5203        }
5204        __tmp.put_u8(self.emitter_type as u8);
5205        __tmp.put_u8(self.tslc);
5206        if matches!(version, MavlinkVersion::V2) {
5207            let len = __tmp.len();
5208            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5209        } else {
5210            __tmp.len()
5211        }
5212    }
5213}
5214#[doc = "Airspeed information from a sensor."]
5215#[doc = ""]
5216#[doc = "ID: 295"]
5217#[derive(Debug, Clone, PartialEq)]
5218#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5219#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5220#[cfg_attr(feature = "ts", derive(TS))]
5221#[cfg_attr(feature = "ts", ts(export))]
5222pub struct AIRSPEED_DATA {
5223    #[doc = "Calibrated airspeed (CAS)."]
5224    pub airspeed: f32,
5225    #[doc = "Raw differential pressure. NaN for value unknown/not supplied."]
5226    pub raw_press: f32,
5227    #[doc = "Temperature. INT16_MAX for value unknown/not supplied."]
5228    pub temperature: i16,
5229    #[doc = "Sensor ID."]
5230    pub id: u8,
5231    #[doc = "Airspeed sensor flags."]
5232    pub flags: AirspeedSensorFlags,
5233}
5234impl AIRSPEED_DATA {
5235    pub const ENCODED_LEN: usize = 12usize;
5236    pub const DEFAULT: Self = Self {
5237        airspeed: 0.0_f32,
5238        raw_press: 0.0_f32,
5239        temperature: 0_i16,
5240        id: 0_u8,
5241        flags: AirspeedSensorFlags::DEFAULT,
5242    };
5243    #[cfg(feature = "arbitrary")]
5244    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5245        use arbitrary::{Arbitrary, Unstructured};
5246        let mut buf = [0u8; 1024];
5247        rng.fill_bytes(&mut buf);
5248        let mut unstructured = Unstructured::new(&buf);
5249        Self::arbitrary(&mut unstructured).unwrap_or_default()
5250    }
5251}
5252impl Default for AIRSPEED_DATA {
5253    fn default() -> Self {
5254        Self::DEFAULT.clone()
5255    }
5256}
5257impl MessageData for AIRSPEED_DATA {
5258    type Message = MavMessage;
5259    const ID: u32 = 295u32;
5260    const NAME: &'static str = "AIRSPEED";
5261    const EXTRA_CRC: u8 = 234u8;
5262    const ENCODED_LEN: usize = 12usize;
5263    fn deser(
5264        _version: MavlinkVersion,
5265        __input: &[u8],
5266    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5267        let avail_len = __input.len();
5268        let mut payload_buf = [0; Self::ENCODED_LEN];
5269        let mut buf = if avail_len < Self::ENCODED_LEN {
5270            payload_buf[0..avail_len].copy_from_slice(__input);
5271            Bytes::new(&payload_buf)
5272        } else {
5273            Bytes::new(__input)
5274        };
5275        let mut __struct = Self::default();
5276        __struct.airspeed = buf.get_f32_le()?;
5277        __struct.raw_press = buf.get_f32_le()?;
5278        __struct.temperature = buf.get_i16_le()?;
5279        __struct.id = buf.get_u8()?;
5280        let tmp = buf.get_u8()?;
5281        __struct.flags = AirspeedSensorFlags::from_bits(
5282            tmp as <AirspeedSensorFlags as Flags>::Bits,
5283        )
5284        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
5285            flag_type: "AirspeedSensorFlags",
5286            value: tmp as u64,
5287        })?;
5288        Ok(__struct)
5289    }
5290    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5291        let mut __tmp = BytesMut::new(bytes);
5292        #[allow(clippy::absurd_extreme_comparisons)]
5293        #[allow(unused_comparisons)]
5294        if __tmp.remaining() < Self::ENCODED_LEN {
5295            panic!(
5296                "buffer is too small (need {} bytes, but got {})",
5297                Self::ENCODED_LEN,
5298                __tmp.remaining(),
5299            )
5300        }
5301        __tmp.put_f32_le(self.airspeed);
5302        __tmp.put_f32_le(self.raw_press);
5303        __tmp.put_i16_le(self.temperature);
5304        __tmp.put_u8(self.id);
5305        __tmp.put_u8(self.flags.bits() as u8);
5306        if matches!(version, MavlinkVersion::V2) {
5307            let len = __tmp.len();
5308            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5309        } else {
5310            __tmp.len()
5311        }
5312    }
5313}
5314#[doc = "The location and information of an AIS vessel."]
5315#[doc = ""]
5316#[doc = "ID: 301"]
5317#[derive(Debug, Clone, PartialEq)]
5318#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5319#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5320#[cfg_attr(feature = "ts", derive(TS))]
5321#[cfg_attr(feature = "ts", ts(export))]
5322pub struct AIS_VESSEL_DATA {
5323    #[doc = "Mobile Marine Service Identifier, 9 decimal digits"]
5324    pub MMSI: u32,
5325    #[doc = "Latitude"]
5326    pub lat: i32,
5327    #[doc = "Longitude"]
5328    pub lon: i32,
5329    #[doc = "Course over ground"]
5330    pub COG: u16,
5331    #[doc = "True heading"]
5332    pub heading: u16,
5333    #[doc = "Speed over ground"]
5334    pub velocity: u16,
5335    #[doc = "Distance from lat/lon location to bow"]
5336    pub dimension_bow: u16,
5337    #[doc = "Distance from lat/lon location to stern"]
5338    pub dimension_stern: u16,
5339    #[doc = "Time since last communication in seconds"]
5340    pub tslc: u16,
5341    #[doc = "Bitmask to indicate various statuses including valid data fields"]
5342    pub flags: AisFlags,
5343    #[doc = "Turn rate"]
5344    pub turn_rate: i8,
5345    #[doc = "Navigational status"]
5346    pub navigational_status: AisNavStatus,
5347    #[doc = "Type of vessels"]
5348    pub mavtype: AisType,
5349    #[doc = "Distance from lat/lon location to port side"]
5350    pub dimension_port: u8,
5351    #[doc = "Distance from lat/lon location to starboard side"]
5352    pub dimension_starboard: u8,
5353    #[doc = "The vessel callsign"]
5354    #[cfg_attr(feature = "ts", ts(type = "string"))]
5355    pub callsign: CharArray<7>,
5356    #[doc = "The vessel name"]
5357    #[cfg_attr(feature = "ts", ts(type = "string"))]
5358    pub name: CharArray<20>,
5359}
5360impl AIS_VESSEL_DATA {
5361    pub const ENCODED_LEN: usize = 58usize;
5362    pub const DEFAULT: Self = Self {
5363        MMSI: 0_u32,
5364        lat: 0_i32,
5365        lon: 0_i32,
5366        COG: 0_u16,
5367        heading: 0_u16,
5368        velocity: 0_u16,
5369        dimension_bow: 0_u16,
5370        dimension_stern: 0_u16,
5371        tslc: 0_u16,
5372        flags: AisFlags::DEFAULT,
5373        turn_rate: 0_i8,
5374        navigational_status: AisNavStatus::DEFAULT,
5375        mavtype: AisType::DEFAULT,
5376        dimension_port: 0_u8,
5377        dimension_starboard: 0_u8,
5378        callsign: CharArray::new([0_u8; 7usize]),
5379        name: CharArray::new([0_u8; 20usize]),
5380    };
5381    #[cfg(feature = "arbitrary")]
5382    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5383        use arbitrary::{Arbitrary, Unstructured};
5384        let mut buf = [0u8; 1024];
5385        rng.fill_bytes(&mut buf);
5386        let mut unstructured = Unstructured::new(&buf);
5387        Self::arbitrary(&mut unstructured).unwrap_or_default()
5388    }
5389}
5390impl Default for AIS_VESSEL_DATA {
5391    fn default() -> Self {
5392        Self::DEFAULT.clone()
5393    }
5394}
5395impl MessageData for AIS_VESSEL_DATA {
5396    type Message = MavMessage;
5397    const ID: u32 = 301u32;
5398    const NAME: &'static str = "AIS_VESSEL";
5399    const EXTRA_CRC: u8 = 243u8;
5400    const ENCODED_LEN: usize = 58usize;
5401    fn deser(
5402        _version: MavlinkVersion,
5403        __input: &[u8],
5404    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5405        let avail_len = __input.len();
5406        let mut payload_buf = [0; Self::ENCODED_LEN];
5407        let mut buf = if avail_len < Self::ENCODED_LEN {
5408            payload_buf[0..avail_len].copy_from_slice(__input);
5409            Bytes::new(&payload_buf)
5410        } else {
5411            Bytes::new(__input)
5412        };
5413        let mut __struct = Self::default();
5414        __struct.MMSI = buf.get_u32_le()?;
5415        __struct.lat = buf.get_i32_le()?;
5416        __struct.lon = buf.get_i32_le()?;
5417        __struct.COG = buf.get_u16_le()?;
5418        __struct.heading = buf.get_u16_le()?;
5419        __struct.velocity = buf.get_u16_le()?;
5420        __struct.dimension_bow = buf.get_u16_le()?;
5421        __struct.dimension_stern = buf.get_u16_le()?;
5422        __struct.tslc = buf.get_u16_le()?;
5423        let tmp = buf.get_u16_le()?;
5424        __struct.flags = AisFlags::from_bits(tmp as <AisFlags as Flags>::Bits).ok_or(
5425            ::mavlink_core::error::ParserError::InvalidFlag {
5426                flag_type: "AisFlags",
5427                value: tmp as u64,
5428            },
5429        )?;
5430        __struct.turn_rate = buf.get_i8()?;
5431        let tmp = buf.get_u8()?;
5432        __struct.navigational_status =
5433            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5434                enum_type: "AisNavStatus",
5435                value: tmp as u64,
5436            })?;
5437        let tmp = buf.get_u8()?;
5438        __struct.mavtype =
5439            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5440                enum_type: "AisType",
5441                value: tmp as u64,
5442            })?;
5443        __struct.dimension_port = buf.get_u8()?;
5444        __struct.dimension_starboard = buf.get_u8()?;
5445        let mut tmp = [0_u8; 7usize];
5446        for v in &mut tmp {
5447            *v = buf.get_u8()?;
5448        }
5449        __struct.callsign = CharArray::new(tmp);
5450        let mut tmp = [0_u8; 20usize];
5451        for v in &mut tmp {
5452            *v = buf.get_u8()?;
5453        }
5454        __struct.name = CharArray::new(tmp);
5455        Ok(__struct)
5456    }
5457    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5458        let mut __tmp = BytesMut::new(bytes);
5459        #[allow(clippy::absurd_extreme_comparisons)]
5460        #[allow(unused_comparisons)]
5461        if __tmp.remaining() < Self::ENCODED_LEN {
5462            panic!(
5463                "buffer is too small (need {} bytes, but got {})",
5464                Self::ENCODED_LEN,
5465                __tmp.remaining(),
5466            )
5467        }
5468        __tmp.put_u32_le(self.MMSI);
5469        __tmp.put_i32_le(self.lat);
5470        __tmp.put_i32_le(self.lon);
5471        __tmp.put_u16_le(self.COG);
5472        __tmp.put_u16_le(self.heading);
5473        __tmp.put_u16_le(self.velocity);
5474        __tmp.put_u16_le(self.dimension_bow);
5475        __tmp.put_u16_le(self.dimension_stern);
5476        __tmp.put_u16_le(self.tslc);
5477        __tmp.put_u16_le(self.flags.bits() as u16);
5478        __tmp.put_i8(self.turn_rate);
5479        __tmp.put_u8(self.navigational_status as u8);
5480        __tmp.put_u8(self.mavtype as u8);
5481        __tmp.put_u8(self.dimension_port);
5482        __tmp.put_u8(self.dimension_starboard);
5483        for val in &self.callsign {
5484            __tmp.put_u8(*val);
5485        }
5486        for val in &self.name {
5487            __tmp.put_u8(*val);
5488        }
5489        if matches!(version, MavlinkVersion::V2) {
5490            let len = __tmp.len();
5491            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5492        } else {
5493            __tmp.len()
5494        }
5495    }
5496}
5497#[doc = "The current system altitude."]
5498#[doc = ""]
5499#[doc = "ID: 141"]
5500#[derive(Debug, Clone, PartialEq)]
5501#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5502#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5503#[cfg_attr(feature = "ts", derive(TS))]
5504#[cfg_attr(feature = "ts", ts(export))]
5505pub struct ALTITUDE_DATA {
5506    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5507    pub time_usec: u64,
5508    #[doc = "This altitude measure is initialized on system boot and monotonic (it is never reset, but represents the local altitude change). The only guarantee on this field is that it will never be reset and is consistent within a flight. The recommended value for this field is the uncorrected barometric altitude at boot time. This altitude will also drift and vary between flights."]
5509    pub altitude_monotonic: f32,
5510    #[doc = "This altitude measure is strictly above mean sea level and might be non-monotonic (it might reset on events like GPS lock or when a new QNH value is set). It should be the altitude to which global altitude waypoints are compared to. Note that it is *not* the GPS altitude, however, most GPS modules already output MSL by default and not the WGS84 altitude."]
5511    pub altitude_amsl: f32,
5512    #[doc = "This is the local altitude in the local coordinate frame. It is not the altitude above home, but in reference to the coordinate origin (0, 0, 0). It is up-positive."]
5513    pub altitude_local: f32,
5514    #[doc = "This is the altitude above the home position. It resets on each change of the current home position."]
5515    pub altitude_relative: f32,
5516    #[doc = "This is the altitude above terrain. It might be fed by a terrain database or an altimeter. Values smaller than -1000 should be interpreted as unknown."]
5517    pub altitude_terrain: f32,
5518    #[doc = "This is not the altitude, but the clear space below the system according to the fused clearance estimate. It generally should max out at the maximum range of e.g. the laser altimeter. It is generally a moving target. A negative value indicates no measurement available."]
5519    pub bottom_clearance: f32,
5520}
5521impl ALTITUDE_DATA {
5522    pub const ENCODED_LEN: usize = 32usize;
5523    pub const DEFAULT: Self = Self {
5524        time_usec: 0_u64,
5525        altitude_monotonic: 0.0_f32,
5526        altitude_amsl: 0.0_f32,
5527        altitude_local: 0.0_f32,
5528        altitude_relative: 0.0_f32,
5529        altitude_terrain: 0.0_f32,
5530        bottom_clearance: 0.0_f32,
5531    };
5532    #[cfg(feature = "arbitrary")]
5533    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5534        use arbitrary::{Arbitrary, Unstructured};
5535        let mut buf = [0u8; 1024];
5536        rng.fill_bytes(&mut buf);
5537        let mut unstructured = Unstructured::new(&buf);
5538        Self::arbitrary(&mut unstructured).unwrap_or_default()
5539    }
5540}
5541impl Default for ALTITUDE_DATA {
5542    fn default() -> Self {
5543        Self::DEFAULT.clone()
5544    }
5545}
5546impl MessageData for ALTITUDE_DATA {
5547    type Message = MavMessage;
5548    const ID: u32 = 141u32;
5549    const NAME: &'static str = "ALTITUDE";
5550    const EXTRA_CRC: u8 = 47u8;
5551    const ENCODED_LEN: usize = 32usize;
5552    fn deser(
5553        _version: MavlinkVersion,
5554        __input: &[u8],
5555    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5556        let avail_len = __input.len();
5557        let mut payload_buf = [0; Self::ENCODED_LEN];
5558        let mut buf = if avail_len < Self::ENCODED_LEN {
5559            payload_buf[0..avail_len].copy_from_slice(__input);
5560            Bytes::new(&payload_buf)
5561        } else {
5562            Bytes::new(__input)
5563        };
5564        let mut __struct = Self::default();
5565        __struct.time_usec = buf.get_u64_le()?;
5566        __struct.altitude_monotonic = buf.get_f32_le()?;
5567        __struct.altitude_amsl = buf.get_f32_le()?;
5568        __struct.altitude_local = buf.get_f32_le()?;
5569        __struct.altitude_relative = buf.get_f32_le()?;
5570        __struct.altitude_terrain = buf.get_f32_le()?;
5571        __struct.bottom_clearance = buf.get_f32_le()?;
5572        Ok(__struct)
5573    }
5574    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5575        let mut __tmp = BytesMut::new(bytes);
5576        #[allow(clippy::absurd_extreme_comparisons)]
5577        #[allow(unused_comparisons)]
5578        if __tmp.remaining() < Self::ENCODED_LEN {
5579            panic!(
5580                "buffer is too small (need {} bytes, but got {})",
5581                Self::ENCODED_LEN,
5582                __tmp.remaining(),
5583            )
5584        }
5585        __tmp.put_u64_le(self.time_usec);
5586        __tmp.put_f32_le(self.altitude_monotonic);
5587        __tmp.put_f32_le(self.altitude_amsl);
5588        __tmp.put_f32_le(self.altitude_local);
5589        __tmp.put_f32_le(self.altitude_relative);
5590        __tmp.put_f32_le(self.altitude_terrain);
5591        __tmp.put_f32_le(self.bottom_clearance);
5592        if matches!(version, MavlinkVersion::V2) {
5593            let len = __tmp.len();
5594            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5595        } else {
5596            __tmp.len()
5597        }
5598    }
5599}
5600#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
5601#[doc = ""]
5602#[doc = "ID: 30"]
5603#[derive(Debug, Clone, PartialEq)]
5604#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5605#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5606#[cfg_attr(feature = "ts", derive(TS))]
5607#[cfg_attr(feature = "ts", ts(export))]
5608pub struct ATTITUDE_DATA {
5609    #[doc = "Timestamp (time since system boot)."]
5610    pub time_boot_ms: u32,
5611    #[doc = "Roll angle (-pi..+pi)"]
5612    pub roll: f32,
5613    #[doc = "Pitch angle (-pi..+pi)"]
5614    pub pitch: f32,
5615    #[doc = "Yaw angle (-pi..+pi)"]
5616    pub yaw: f32,
5617    #[doc = "Roll angular speed"]
5618    pub rollspeed: f32,
5619    #[doc = "Pitch angular speed"]
5620    pub pitchspeed: f32,
5621    #[doc = "Yaw angular speed"]
5622    pub yawspeed: f32,
5623}
5624impl ATTITUDE_DATA {
5625    pub const ENCODED_LEN: usize = 28usize;
5626    pub const DEFAULT: Self = Self {
5627        time_boot_ms: 0_u32,
5628        roll: 0.0_f32,
5629        pitch: 0.0_f32,
5630        yaw: 0.0_f32,
5631        rollspeed: 0.0_f32,
5632        pitchspeed: 0.0_f32,
5633        yawspeed: 0.0_f32,
5634    };
5635    #[cfg(feature = "arbitrary")]
5636    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5637        use arbitrary::{Arbitrary, Unstructured};
5638        let mut buf = [0u8; 1024];
5639        rng.fill_bytes(&mut buf);
5640        let mut unstructured = Unstructured::new(&buf);
5641        Self::arbitrary(&mut unstructured).unwrap_or_default()
5642    }
5643}
5644impl Default for ATTITUDE_DATA {
5645    fn default() -> Self {
5646        Self::DEFAULT.clone()
5647    }
5648}
5649impl MessageData for ATTITUDE_DATA {
5650    type Message = MavMessage;
5651    const ID: u32 = 30u32;
5652    const NAME: &'static str = "ATTITUDE";
5653    const EXTRA_CRC: u8 = 39u8;
5654    const ENCODED_LEN: usize = 28usize;
5655    fn deser(
5656        _version: MavlinkVersion,
5657        __input: &[u8],
5658    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5659        let avail_len = __input.len();
5660        let mut payload_buf = [0; Self::ENCODED_LEN];
5661        let mut buf = if avail_len < Self::ENCODED_LEN {
5662            payload_buf[0..avail_len].copy_from_slice(__input);
5663            Bytes::new(&payload_buf)
5664        } else {
5665            Bytes::new(__input)
5666        };
5667        let mut __struct = Self::default();
5668        __struct.time_boot_ms = buf.get_u32_le()?;
5669        __struct.roll = buf.get_f32_le()?;
5670        __struct.pitch = buf.get_f32_le()?;
5671        __struct.yaw = buf.get_f32_le()?;
5672        __struct.rollspeed = buf.get_f32_le()?;
5673        __struct.pitchspeed = buf.get_f32_le()?;
5674        __struct.yawspeed = buf.get_f32_le()?;
5675        Ok(__struct)
5676    }
5677    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5678        let mut __tmp = BytesMut::new(bytes);
5679        #[allow(clippy::absurd_extreme_comparisons)]
5680        #[allow(unused_comparisons)]
5681        if __tmp.remaining() < Self::ENCODED_LEN {
5682            panic!(
5683                "buffer is too small (need {} bytes, but got {})",
5684                Self::ENCODED_LEN,
5685                __tmp.remaining(),
5686            )
5687        }
5688        __tmp.put_u32_le(self.time_boot_ms);
5689        __tmp.put_f32_le(self.roll);
5690        __tmp.put_f32_le(self.pitch);
5691        __tmp.put_f32_le(self.yaw);
5692        __tmp.put_f32_le(self.rollspeed);
5693        __tmp.put_f32_le(self.pitchspeed);
5694        __tmp.put_f32_le(self.yawspeed);
5695        if matches!(version, MavlinkVersion::V2) {
5696            let len = __tmp.len();
5697            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5698        } else {
5699            __tmp.len()
5700        }
5701    }
5702}
5703#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
5704#[doc = ""]
5705#[doc = "ID: 31"]
5706#[derive(Debug, Clone, PartialEq)]
5707#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5708#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5709#[cfg_attr(feature = "ts", derive(TS))]
5710#[cfg_attr(feature = "ts", ts(export))]
5711pub struct ATTITUDE_QUATERNION_DATA {
5712    #[doc = "Timestamp (time since system boot)."]
5713    pub time_boot_ms: u32,
5714    #[doc = "Quaternion component 1, w (1 in null-rotation)"]
5715    pub q1: f32,
5716    #[doc = "Quaternion component 2, x (0 in null-rotation)"]
5717    pub q2: f32,
5718    #[doc = "Quaternion component 3, y (0 in null-rotation)"]
5719    pub q3: f32,
5720    #[doc = "Quaternion component 4, z (0 in null-rotation)"]
5721    pub q4: f32,
5722    #[doc = "Roll angular speed"]
5723    pub rollspeed: f32,
5724    #[doc = "Pitch angular speed"]
5725    pub pitchspeed: f32,
5726    #[doc = "Yaw angular speed"]
5727    pub yawspeed: f32,
5728    #[doc = "Rotation offset by which the attitude quaternion and angular speed vector should be rotated for user display (quaternion with [w, x, y, z] order, zero-rotation is [1, 0, 0, 0], send [0, 0, 0, 0] if field not supported). This field is intended for systems in which the reference attitude may change during flight. For example, tailsitters VTOLs rotate their reference attitude by 90 degrees between hover mode and fixed wing mode, thus repr_offset_q is equal to [1, 0, 0, 0] in hover mode and equal to [0.7071, 0, 0.7071, 0] in fixed wing mode."]
5729    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5730    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5731    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5732    pub repr_offset_q: [f32; 4],
5733}
5734impl ATTITUDE_QUATERNION_DATA {
5735    pub const ENCODED_LEN: usize = 48usize;
5736    pub const DEFAULT: Self = Self {
5737        time_boot_ms: 0_u32,
5738        q1: 0.0_f32,
5739        q2: 0.0_f32,
5740        q3: 0.0_f32,
5741        q4: 0.0_f32,
5742        rollspeed: 0.0_f32,
5743        pitchspeed: 0.0_f32,
5744        yawspeed: 0.0_f32,
5745        repr_offset_q: [0.0_f32; 4usize],
5746    };
5747    #[cfg(feature = "arbitrary")]
5748    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5749        use arbitrary::{Arbitrary, Unstructured};
5750        let mut buf = [0u8; 1024];
5751        rng.fill_bytes(&mut buf);
5752        let mut unstructured = Unstructured::new(&buf);
5753        Self::arbitrary(&mut unstructured).unwrap_or_default()
5754    }
5755}
5756impl Default for ATTITUDE_QUATERNION_DATA {
5757    fn default() -> Self {
5758        Self::DEFAULT.clone()
5759    }
5760}
5761impl MessageData for ATTITUDE_QUATERNION_DATA {
5762    type Message = MavMessage;
5763    const ID: u32 = 31u32;
5764    const NAME: &'static str = "ATTITUDE_QUATERNION";
5765    const EXTRA_CRC: u8 = 246u8;
5766    const ENCODED_LEN: usize = 48usize;
5767    fn deser(
5768        _version: MavlinkVersion,
5769        __input: &[u8],
5770    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5771        let avail_len = __input.len();
5772        let mut payload_buf = [0; Self::ENCODED_LEN];
5773        let mut buf = if avail_len < Self::ENCODED_LEN {
5774            payload_buf[0..avail_len].copy_from_slice(__input);
5775            Bytes::new(&payload_buf)
5776        } else {
5777            Bytes::new(__input)
5778        };
5779        let mut __struct = Self::default();
5780        __struct.time_boot_ms = buf.get_u32_le()?;
5781        __struct.q1 = buf.get_f32_le()?;
5782        __struct.q2 = buf.get_f32_le()?;
5783        __struct.q3 = buf.get_f32_le()?;
5784        __struct.q4 = buf.get_f32_le()?;
5785        __struct.rollspeed = buf.get_f32_le()?;
5786        __struct.pitchspeed = buf.get_f32_le()?;
5787        __struct.yawspeed = buf.get_f32_le()?;
5788        for v in &mut __struct.repr_offset_q {
5789            let val = buf.get_f32_le()?;
5790            *v = val;
5791        }
5792        Ok(__struct)
5793    }
5794    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5795        let mut __tmp = BytesMut::new(bytes);
5796        #[allow(clippy::absurd_extreme_comparisons)]
5797        #[allow(unused_comparisons)]
5798        if __tmp.remaining() < Self::ENCODED_LEN {
5799            panic!(
5800                "buffer is too small (need {} bytes, but got {})",
5801                Self::ENCODED_LEN,
5802                __tmp.remaining(),
5803            )
5804        }
5805        __tmp.put_u32_le(self.time_boot_ms);
5806        __tmp.put_f32_le(self.q1);
5807        __tmp.put_f32_le(self.q2);
5808        __tmp.put_f32_le(self.q3);
5809        __tmp.put_f32_le(self.q4);
5810        __tmp.put_f32_le(self.rollspeed);
5811        __tmp.put_f32_le(self.pitchspeed);
5812        __tmp.put_f32_le(self.yawspeed);
5813        if matches!(version, MavlinkVersion::V2) {
5814            for val in &self.repr_offset_q {
5815                __tmp.put_f32_le(*val);
5816            }
5817            let len = __tmp.len();
5818            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5819        } else {
5820            __tmp.len()
5821        }
5822    }
5823}
5824#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
5825#[doc = ""]
5826#[doc = "ID: 61"]
5827#[derive(Debug, Clone, PartialEq)]
5828#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5829#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5830#[cfg_attr(feature = "ts", derive(TS))]
5831#[cfg_attr(feature = "ts", ts(export))]
5832pub struct ATTITUDE_QUATERNION_COV_DATA {
5833    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5834    pub time_usec: u64,
5835    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
5836    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5837    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5838    pub q: [f32; 4],
5839    #[doc = "Roll angular speed"]
5840    pub rollspeed: f32,
5841    #[doc = "Pitch angular speed"]
5842    pub pitchspeed: f32,
5843    #[doc = "Yaw angular speed"]
5844    pub yawspeed: f32,
5845    #[doc = "Row-major representation of a 3x3 attitude covariance matrix (states: roll, pitch, yaw; first three entries are the first ROW, next three entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
5846    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5847    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5848    pub covariance: [f32; 9],
5849}
5850impl ATTITUDE_QUATERNION_COV_DATA {
5851    pub const ENCODED_LEN: usize = 72usize;
5852    pub const DEFAULT: Self = Self {
5853        time_usec: 0_u64,
5854        q: [0.0_f32; 4usize],
5855        rollspeed: 0.0_f32,
5856        pitchspeed: 0.0_f32,
5857        yawspeed: 0.0_f32,
5858        covariance: [0.0_f32; 9usize],
5859    };
5860    #[cfg(feature = "arbitrary")]
5861    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5862        use arbitrary::{Arbitrary, Unstructured};
5863        let mut buf = [0u8; 1024];
5864        rng.fill_bytes(&mut buf);
5865        let mut unstructured = Unstructured::new(&buf);
5866        Self::arbitrary(&mut unstructured).unwrap_or_default()
5867    }
5868}
5869impl Default for ATTITUDE_QUATERNION_COV_DATA {
5870    fn default() -> Self {
5871        Self::DEFAULT.clone()
5872    }
5873}
5874impl MessageData for ATTITUDE_QUATERNION_COV_DATA {
5875    type Message = MavMessage;
5876    const ID: u32 = 61u32;
5877    const NAME: &'static str = "ATTITUDE_QUATERNION_COV";
5878    const EXTRA_CRC: u8 = 167u8;
5879    const ENCODED_LEN: usize = 72usize;
5880    fn deser(
5881        _version: MavlinkVersion,
5882        __input: &[u8],
5883    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5884        let avail_len = __input.len();
5885        let mut payload_buf = [0; Self::ENCODED_LEN];
5886        let mut buf = if avail_len < Self::ENCODED_LEN {
5887            payload_buf[0..avail_len].copy_from_slice(__input);
5888            Bytes::new(&payload_buf)
5889        } else {
5890            Bytes::new(__input)
5891        };
5892        let mut __struct = Self::default();
5893        __struct.time_usec = buf.get_u64_le()?;
5894        for v in &mut __struct.q {
5895            let val = buf.get_f32_le()?;
5896            *v = val;
5897        }
5898        __struct.rollspeed = buf.get_f32_le()?;
5899        __struct.pitchspeed = buf.get_f32_le()?;
5900        __struct.yawspeed = buf.get_f32_le()?;
5901        for v in &mut __struct.covariance {
5902            let val = buf.get_f32_le()?;
5903            *v = val;
5904        }
5905        Ok(__struct)
5906    }
5907    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5908        let mut __tmp = BytesMut::new(bytes);
5909        #[allow(clippy::absurd_extreme_comparisons)]
5910        #[allow(unused_comparisons)]
5911        if __tmp.remaining() < Self::ENCODED_LEN {
5912            panic!(
5913                "buffer is too small (need {} bytes, but got {})",
5914                Self::ENCODED_LEN,
5915                __tmp.remaining(),
5916            )
5917        }
5918        __tmp.put_u64_le(self.time_usec);
5919        for val in &self.q {
5920            __tmp.put_f32_le(*val);
5921        }
5922        __tmp.put_f32_le(self.rollspeed);
5923        __tmp.put_f32_le(self.pitchspeed);
5924        __tmp.put_f32_le(self.yawspeed);
5925        for val in &self.covariance {
5926            __tmp.put_f32_le(*val);
5927        }
5928        if matches!(version, MavlinkVersion::V2) {
5929            let len = __tmp.len();
5930            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5931        } else {
5932            __tmp.len()
5933        }
5934    }
5935}
5936#[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
5937#[doc = ""]
5938#[doc = "ID: 83"]
5939#[derive(Debug, Clone, PartialEq)]
5940#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5941#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5942#[cfg_attr(feature = "ts", derive(TS))]
5943#[cfg_attr(feature = "ts", ts(export))]
5944pub struct ATTITUDE_TARGET_DATA {
5945    #[doc = "Timestamp (time since system boot)."]
5946    pub time_boot_ms: u32,
5947    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
5948    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5949    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
5950    pub q: [f32; 4],
5951    #[doc = "Body roll rate"]
5952    pub body_roll_rate: f32,
5953    #[doc = "Body pitch rate"]
5954    pub body_pitch_rate: f32,
5955    #[doc = "Body yaw rate"]
5956    pub body_yaw_rate: f32,
5957    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
5958    pub thrust: f32,
5959    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
5960    pub type_mask: AttitudeTargetTypemask,
5961}
5962impl ATTITUDE_TARGET_DATA {
5963    pub const ENCODED_LEN: usize = 37usize;
5964    pub const DEFAULT: Self = Self {
5965        time_boot_ms: 0_u32,
5966        q: [0.0_f32; 4usize],
5967        body_roll_rate: 0.0_f32,
5968        body_pitch_rate: 0.0_f32,
5969        body_yaw_rate: 0.0_f32,
5970        thrust: 0.0_f32,
5971        type_mask: AttitudeTargetTypemask::DEFAULT,
5972    };
5973    #[cfg(feature = "arbitrary")]
5974    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5975        use arbitrary::{Arbitrary, Unstructured};
5976        let mut buf = [0u8; 1024];
5977        rng.fill_bytes(&mut buf);
5978        let mut unstructured = Unstructured::new(&buf);
5979        Self::arbitrary(&mut unstructured).unwrap_or_default()
5980    }
5981}
5982impl Default for ATTITUDE_TARGET_DATA {
5983    fn default() -> Self {
5984        Self::DEFAULT.clone()
5985    }
5986}
5987impl MessageData for ATTITUDE_TARGET_DATA {
5988    type Message = MavMessage;
5989    const ID: u32 = 83u32;
5990    const NAME: &'static str = "ATTITUDE_TARGET";
5991    const EXTRA_CRC: u8 = 22u8;
5992    const ENCODED_LEN: usize = 37usize;
5993    fn deser(
5994        _version: MavlinkVersion,
5995        __input: &[u8],
5996    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5997        let avail_len = __input.len();
5998        let mut payload_buf = [0; Self::ENCODED_LEN];
5999        let mut buf = if avail_len < Self::ENCODED_LEN {
6000            payload_buf[0..avail_len].copy_from_slice(__input);
6001            Bytes::new(&payload_buf)
6002        } else {
6003            Bytes::new(__input)
6004        };
6005        let mut __struct = Self::default();
6006        __struct.time_boot_ms = buf.get_u32_le()?;
6007        for v in &mut __struct.q {
6008            let val = buf.get_f32_le()?;
6009            *v = val;
6010        }
6011        __struct.body_roll_rate = buf.get_f32_le()?;
6012        __struct.body_pitch_rate = buf.get_f32_le()?;
6013        __struct.body_yaw_rate = buf.get_f32_le()?;
6014        __struct.thrust = buf.get_f32_le()?;
6015        let tmp = buf.get_u8()?;
6016        __struct.type_mask =
6017            AttitudeTargetTypemask::from_bits(tmp as <AttitudeTargetTypemask as Flags>::Bits)
6018                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6019                    flag_type: "AttitudeTargetTypemask",
6020                    value: tmp as u64,
6021                })?;
6022        Ok(__struct)
6023    }
6024    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6025        let mut __tmp = BytesMut::new(bytes);
6026        #[allow(clippy::absurd_extreme_comparisons)]
6027        #[allow(unused_comparisons)]
6028        if __tmp.remaining() < Self::ENCODED_LEN {
6029            panic!(
6030                "buffer is too small (need {} bytes, but got {})",
6031                Self::ENCODED_LEN,
6032                __tmp.remaining(),
6033            )
6034        }
6035        __tmp.put_u32_le(self.time_boot_ms);
6036        for val in &self.q {
6037            __tmp.put_f32_le(*val);
6038        }
6039        __tmp.put_f32_le(self.body_roll_rate);
6040        __tmp.put_f32_le(self.body_pitch_rate);
6041        __tmp.put_f32_le(self.body_yaw_rate);
6042        __tmp.put_f32_le(self.thrust);
6043        __tmp.put_u8(self.type_mask.bits() as u8);
6044        if matches!(version, MavlinkVersion::V2) {
6045            let len = __tmp.len();
6046            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6047        } else {
6048            __tmp.len()
6049        }
6050    }
6051}
6052#[doc = "Motion capture attitude and position."]
6053#[doc = ""]
6054#[doc = "ID: 138"]
6055#[derive(Debug, Clone, PartialEq)]
6056#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6057#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6058#[cfg_attr(feature = "ts", derive(TS))]
6059#[cfg_attr(feature = "ts", ts(export))]
6060pub struct ATT_POS_MOCAP_DATA {
6061    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
6062    pub time_usec: u64,
6063    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
6064    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6065    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6066    pub q: [f32; 4],
6067    #[doc = "X position (NED)"]
6068    pub x: f32,
6069    #[doc = "Y position (NED)"]
6070    pub y: f32,
6071    #[doc = "Z position (NED)"]
6072    pub z: f32,
6073    #[doc = "Row-major representation of a pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
6074    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6075    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6076    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6077    pub covariance: [f32; 21],
6078}
6079impl ATT_POS_MOCAP_DATA {
6080    pub const ENCODED_LEN: usize = 120usize;
6081    pub const DEFAULT: Self = Self {
6082        time_usec: 0_u64,
6083        q: [0.0_f32; 4usize],
6084        x: 0.0_f32,
6085        y: 0.0_f32,
6086        z: 0.0_f32,
6087        covariance: [0.0_f32; 21usize],
6088    };
6089    #[cfg(feature = "arbitrary")]
6090    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6091        use arbitrary::{Arbitrary, Unstructured};
6092        let mut buf = [0u8; 1024];
6093        rng.fill_bytes(&mut buf);
6094        let mut unstructured = Unstructured::new(&buf);
6095        Self::arbitrary(&mut unstructured).unwrap_or_default()
6096    }
6097}
6098impl Default for ATT_POS_MOCAP_DATA {
6099    fn default() -> Self {
6100        Self::DEFAULT.clone()
6101    }
6102}
6103impl MessageData for ATT_POS_MOCAP_DATA {
6104    type Message = MavMessage;
6105    const ID: u32 = 138u32;
6106    const NAME: &'static str = "ATT_POS_MOCAP";
6107    const EXTRA_CRC: u8 = 109u8;
6108    const ENCODED_LEN: usize = 120usize;
6109    fn deser(
6110        _version: MavlinkVersion,
6111        __input: &[u8],
6112    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6113        let avail_len = __input.len();
6114        let mut payload_buf = [0; Self::ENCODED_LEN];
6115        let mut buf = if avail_len < Self::ENCODED_LEN {
6116            payload_buf[0..avail_len].copy_from_slice(__input);
6117            Bytes::new(&payload_buf)
6118        } else {
6119            Bytes::new(__input)
6120        };
6121        let mut __struct = Self::default();
6122        __struct.time_usec = buf.get_u64_le()?;
6123        for v in &mut __struct.q {
6124            let val = buf.get_f32_le()?;
6125            *v = val;
6126        }
6127        __struct.x = buf.get_f32_le()?;
6128        __struct.y = buf.get_f32_le()?;
6129        __struct.z = buf.get_f32_le()?;
6130        for v in &mut __struct.covariance {
6131            let val = buf.get_f32_le()?;
6132            *v = val;
6133        }
6134        Ok(__struct)
6135    }
6136    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6137        let mut __tmp = BytesMut::new(bytes);
6138        #[allow(clippy::absurd_extreme_comparisons)]
6139        #[allow(unused_comparisons)]
6140        if __tmp.remaining() < Self::ENCODED_LEN {
6141            panic!(
6142                "buffer is too small (need {} bytes, but got {})",
6143                Self::ENCODED_LEN,
6144                __tmp.remaining(),
6145            )
6146        }
6147        __tmp.put_u64_le(self.time_usec);
6148        for val in &self.q {
6149            __tmp.put_f32_le(*val);
6150        }
6151        __tmp.put_f32_le(self.x);
6152        __tmp.put_f32_le(self.y);
6153        __tmp.put_f32_le(self.z);
6154        if matches!(version, MavlinkVersion::V2) {
6155            for val in &self.covariance {
6156                __tmp.put_f32_le(*val);
6157            }
6158            let len = __tmp.len();
6159            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6160        } else {
6161            __tmp.len()
6162        }
6163    }
6164}
6165#[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
6166#[doc = ""]
6167#[doc = "ID: 7"]
6168#[derive(Debug, Clone, PartialEq)]
6169#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6170#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6171#[cfg_attr(feature = "ts", derive(TS))]
6172#[cfg_attr(feature = "ts", ts(export))]
6173pub struct AUTH_KEY_DATA {
6174    #[doc = "key"]
6175    #[cfg_attr(feature = "ts", ts(type = "string"))]
6176    pub key: CharArray<32>,
6177}
6178impl AUTH_KEY_DATA {
6179    pub const ENCODED_LEN: usize = 32usize;
6180    pub const DEFAULT: Self = Self {
6181        key: CharArray::new([0_u8; 32usize]),
6182    };
6183    #[cfg(feature = "arbitrary")]
6184    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6185        use arbitrary::{Arbitrary, Unstructured};
6186        let mut buf = [0u8; 1024];
6187        rng.fill_bytes(&mut buf);
6188        let mut unstructured = Unstructured::new(&buf);
6189        Self::arbitrary(&mut unstructured).unwrap_or_default()
6190    }
6191}
6192impl Default for AUTH_KEY_DATA {
6193    fn default() -> Self {
6194        Self::DEFAULT.clone()
6195    }
6196}
6197impl MessageData for AUTH_KEY_DATA {
6198    type Message = MavMessage;
6199    const ID: u32 = 7u32;
6200    const NAME: &'static str = "AUTH_KEY";
6201    const EXTRA_CRC: u8 = 119u8;
6202    const ENCODED_LEN: usize = 32usize;
6203    fn deser(
6204        _version: MavlinkVersion,
6205        __input: &[u8],
6206    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6207        let avail_len = __input.len();
6208        let mut payload_buf = [0; Self::ENCODED_LEN];
6209        let mut buf = if avail_len < Self::ENCODED_LEN {
6210            payload_buf[0..avail_len].copy_from_slice(__input);
6211            Bytes::new(&payload_buf)
6212        } else {
6213            Bytes::new(__input)
6214        };
6215        let mut __struct = Self::default();
6216        let mut tmp = [0_u8; 32usize];
6217        for v in &mut tmp {
6218            *v = buf.get_u8()?;
6219        }
6220        __struct.key = CharArray::new(tmp);
6221        Ok(__struct)
6222    }
6223    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6224        let mut __tmp = BytesMut::new(bytes);
6225        #[allow(clippy::absurd_extreme_comparisons)]
6226        #[allow(unused_comparisons)]
6227        if __tmp.remaining() < Self::ENCODED_LEN {
6228            panic!(
6229                "buffer is too small (need {} bytes, but got {})",
6230                Self::ENCODED_LEN,
6231                __tmp.remaining(),
6232            )
6233        }
6234        for val in &self.key {
6235            __tmp.put_u8(*val);
6236        }
6237        if matches!(version, MavlinkVersion::V2) {
6238            let len = __tmp.len();
6239            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6240        } else {
6241            __tmp.len()
6242        }
6243    }
6244}
6245#[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
6246#[doc = ""]
6247#[doc = "ID: 286"]
6248#[derive(Debug, Clone, PartialEq)]
6249#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6250#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6251#[cfg_attr(feature = "ts", derive(TS))]
6252#[cfg_attr(feature = "ts", ts(export))]
6253pub struct AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6254    #[doc = "Timestamp (time since system boot)."]
6255    pub time_boot_us: u64,
6256    #[doc = "Quaternion components of autopilot attitude: w, x, y, z (1 0 0 0 is the null-rotation, Hamilton convention)."]
6257    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6258    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6259    pub q: [f32; 4],
6260    #[doc = "Estimated delay of the attitude data. 0 if unknown."]
6261    pub q_estimated_delay_us: u32,
6262    #[doc = "X Speed in NED (North, East, Down). NAN if unknown."]
6263    pub vx: f32,
6264    #[doc = "Y Speed in NED (North, East, Down). NAN if unknown."]
6265    pub vy: f32,
6266    #[doc = "Z Speed in NED (North, East, Down). NAN if unknown."]
6267    pub vz: f32,
6268    #[doc = "Estimated delay of the speed data. 0 if unknown."]
6269    pub v_estimated_delay_us: u32,
6270    #[doc = "Feed forward Z component of angular velocity (positive: yawing to the right). NaN to be ignored. This is to indicate if the autopilot is actively yawing."]
6271    pub feed_forward_angular_velocity_z: f32,
6272    #[doc = "Bitmap indicating which estimator outputs are valid."]
6273    pub estimator_status: EstimatorStatusFlags,
6274    #[doc = "System ID"]
6275    pub target_system: u8,
6276    #[doc = "Component ID"]
6277    pub target_component: u8,
6278    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
6279    pub landed_state: MavLandedState,
6280    #[doc = "Z component of angular velocity in NED (North, East, Down). NaN if unknown."]
6281    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6282    pub angular_velocity_z: f32,
6283}
6284impl AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6285    pub const ENCODED_LEN: usize = 57usize;
6286    pub const DEFAULT: Self = Self {
6287        time_boot_us: 0_u64,
6288        q: [0.0_f32; 4usize],
6289        q_estimated_delay_us: 0_u32,
6290        vx: 0.0_f32,
6291        vy: 0.0_f32,
6292        vz: 0.0_f32,
6293        v_estimated_delay_us: 0_u32,
6294        feed_forward_angular_velocity_z: 0.0_f32,
6295        estimator_status: EstimatorStatusFlags::DEFAULT,
6296        target_system: 0_u8,
6297        target_component: 0_u8,
6298        landed_state: MavLandedState::DEFAULT,
6299        angular_velocity_z: 0.0_f32,
6300    };
6301    #[cfg(feature = "arbitrary")]
6302    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6303        use arbitrary::{Arbitrary, Unstructured};
6304        let mut buf = [0u8; 1024];
6305        rng.fill_bytes(&mut buf);
6306        let mut unstructured = Unstructured::new(&buf);
6307        Self::arbitrary(&mut unstructured).unwrap_or_default()
6308    }
6309}
6310impl Default for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6311    fn default() -> Self {
6312        Self::DEFAULT.clone()
6313    }
6314}
6315impl MessageData for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
6316    type Message = MavMessage;
6317    const ID: u32 = 286u32;
6318    const NAME: &'static str = "AUTOPILOT_STATE_FOR_GIMBAL_DEVICE";
6319    const EXTRA_CRC: u8 = 210u8;
6320    const ENCODED_LEN: usize = 57usize;
6321    fn deser(
6322        _version: MavlinkVersion,
6323        __input: &[u8],
6324    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6325        let avail_len = __input.len();
6326        let mut payload_buf = [0; Self::ENCODED_LEN];
6327        let mut buf = if avail_len < Self::ENCODED_LEN {
6328            payload_buf[0..avail_len].copy_from_slice(__input);
6329            Bytes::new(&payload_buf)
6330        } else {
6331            Bytes::new(__input)
6332        };
6333        let mut __struct = Self::default();
6334        __struct.time_boot_us = buf.get_u64_le()?;
6335        for v in &mut __struct.q {
6336            let val = buf.get_f32_le()?;
6337            *v = val;
6338        }
6339        __struct.q_estimated_delay_us = buf.get_u32_le()?;
6340        __struct.vx = buf.get_f32_le()?;
6341        __struct.vy = buf.get_f32_le()?;
6342        __struct.vz = buf.get_f32_le()?;
6343        __struct.v_estimated_delay_us = buf.get_u32_le()?;
6344        __struct.feed_forward_angular_velocity_z = buf.get_f32_le()?;
6345        let tmp = buf.get_u16_le()?;
6346        __struct.estimator_status = EstimatorStatusFlags::from_bits(
6347            tmp as <EstimatorStatusFlags as Flags>::Bits,
6348        )
6349        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6350            flag_type: "EstimatorStatusFlags",
6351            value: tmp as u64,
6352        })?;
6353        __struct.target_system = buf.get_u8()?;
6354        __struct.target_component = buf.get_u8()?;
6355        let tmp = buf.get_u8()?;
6356        __struct.landed_state =
6357            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6358                enum_type: "MavLandedState",
6359                value: tmp as u64,
6360            })?;
6361        __struct.angular_velocity_z = buf.get_f32_le()?;
6362        Ok(__struct)
6363    }
6364    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6365        let mut __tmp = BytesMut::new(bytes);
6366        #[allow(clippy::absurd_extreme_comparisons)]
6367        #[allow(unused_comparisons)]
6368        if __tmp.remaining() < Self::ENCODED_LEN {
6369            panic!(
6370                "buffer is too small (need {} bytes, but got {})",
6371                Self::ENCODED_LEN,
6372                __tmp.remaining(),
6373            )
6374        }
6375        __tmp.put_u64_le(self.time_boot_us);
6376        for val in &self.q {
6377            __tmp.put_f32_le(*val);
6378        }
6379        __tmp.put_u32_le(self.q_estimated_delay_us);
6380        __tmp.put_f32_le(self.vx);
6381        __tmp.put_f32_le(self.vy);
6382        __tmp.put_f32_le(self.vz);
6383        __tmp.put_u32_le(self.v_estimated_delay_us);
6384        __tmp.put_f32_le(self.feed_forward_angular_velocity_z);
6385        __tmp.put_u16_le(self.estimator_status.bits() as u16);
6386        __tmp.put_u8(self.target_system);
6387        __tmp.put_u8(self.target_component);
6388        __tmp.put_u8(self.landed_state as u8);
6389        if matches!(version, MavlinkVersion::V2) {
6390            __tmp.put_f32_le(self.angular_velocity_z);
6391            let len = __tmp.len();
6392            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6393        } else {
6394            __tmp.len()
6395        }
6396    }
6397}
6398#[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
6399#[doc = ""]
6400#[doc = "ID: 148"]
6401#[derive(Debug, Clone, PartialEq)]
6402#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6403#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6404#[cfg_attr(feature = "ts", derive(TS))]
6405#[cfg_attr(feature = "ts", ts(export))]
6406pub struct AUTOPILOT_VERSION_DATA {
6407    #[doc = "Bitmap of capabilities"]
6408    pub capabilities: MavProtocolCapability,
6409    #[doc = "UID if provided by hardware (see uid2)"]
6410    pub uid: u64,
6411    #[doc = "Firmware version number.         The field must be encoded as 4 bytes, where each byte (shown from MSB to LSB) is part of a semantic version: (major) (minor) (patch) (FIRMWARE_VERSION_TYPE)."]
6412    pub flight_sw_version: u32,
6413    #[doc = "Middleware version number"]
6414    pub middleware_sw_version: u32,
6415    #[doc = "Operating system version number"]
6416    pub os_sw_version: u32,
6417    #[doc = "HW / board version (last 8 bits should be silicon ID, if any). The first 16 bits of this field specify <https://github.com/PX4/PX4-Bootloader/blob/master/board_types.txt>"]
6418    pub board_version: u32,
6419    #[doc = "ID of the board vendor"]
6420    pub vendor_id: u16,
6421    #[doc = "ID of the product"]
6422    pub product_id: u16,
6423    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6424    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6425    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6426    pub flight_custom_version: [u8; 8],
6427    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6428    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6429    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6430    pub middleware_custom_version: [u8; 8],
6431    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6432    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6433    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6434    pub os_custom_version: [u8; 8],
6435    #[doc = "UID if provided by hardware (supersedes the uid field. If this is non-zero, use this field, otherwise use uid)"]
6436    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6437    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6438    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6439    pub uid2: [u8; 18],
6440}
6441impl AUTOPILOT_VERSION_DATA {
6442    pub const ENCODED_LEN: usize = 78usize;
6443    pub const DEFAULT: Self = Self {
6444        capabilities: MavProtocolCapability::DEFAULT,
6445        uid: 0_u64,
6446        flight_sw_version: 0_u32,
6447        middleware_sw_version: 0_u32,
6448        os_sw_version: 0_u32,
6449        board_version: 0_u32,
6450        vendor_id: 0_u16,
6451        product_id: 0_u16,
6452        flight_custom_version: [0_u8; 8usize],
6453        middleware_custom_version: [0_u8; 8usize],
6454        os_custom_version: [0_u8; 8usize],
6455        uid2: [0_u8; 18usize],
6456    };
6457    #[cfg(feature = "arbitrary")]
6458    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6459        use arbitrary::{Arbitrary, Unstructured};
6460        let mut buf = [0u8; 1024];
6461        rng.fill_bytes(&mut buf);
6462        let mut unstructured = Unstructured::new(&buf);
6463        Self::arbitrary(&mut unstructured).unwrap_or_default()
6464    }
6465}
6466impl Default for AUTOPILOT_VERSION_DATA {
6467    fn default() -> Self {
6468        Self::DEFAULT.clone()
6469    }
6470}
6471impl MessageData for AUTOPILOT_VERSION_DATA {
6472    type Message = MavMessage;
6473    const ID: u32 = 148u32;
6474    const NAME: &'static str = "AUTOPILOT_VERSION";
6475    const EXTRA_CRC: u8 = 178u8;
6476    const ENCODED_LEN: usize = 78usize;
6477    fn deser(
6478        _version: MavlinkVersion,
6479        __input: &[u8],
6480    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6481        let avail_len = __input.len();
6482        let mut payload_buf = [0; Self::ENCODED_LEN];
6483        let mut buf = if avail_len < Self::ENCODED_LEN {
6484            payload_buf[0..avail_len].copy_from_slice(__input);
6485            Bytes::new(&payload_buf)
6486        } else {
6487            Bytes::new(__input)
6488        };
6489        let mut __struct = Self::default();
6490        let tmp = buf.get_u64_le()?;
6491        __struct.capabilities = MavProtocolCapability::from_bits(
6492            tmp as <MavProtocolCapability as Flags>::Bits,
6493        )
6494        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6495            flag_type: "MavProtocolCapability",
6496            value: tmp as u64,
6497        })?;
6498        __struct.uid = buf.get_u64_le()?;
6499        __struct.flight_sw_version = buf.get_u32_le()?;
6500        __struct.middleware_sw_version = buf.get_u32_le()?;
6501        __struct.os_sw_version = buf.get_u32_le()?;
6502        __struct.board_version = buf.get_u32_le()?;
6503        __struct.vendor_id = buf.get_u16_le()?;
6504        __struct.product_id = buf.get_u16_le()?;
6505        for v in &mut __struct.flight_custom_version {
6506            let val = buf.get_u8()?;
6507            *v = val;
6508        }
6509        for v in &mut __struct.middleware_custom_version {
6510            let val = buf.get_u8()?;
6511            *v = val;
6512        }
6513        for v in &mut __struct.os_custom_version {
6514            let val = buf.get_u8()?;
6515            *v = val;
6516        }
6517        for v in &mut __struct.uid2 {
6518            let val = buf.get_u8()?;
6519            *v = val;
6520        }
6521        Ok(__struct)
6522    }
6523    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6524        let mut __tmp = BytesMut::new(bytes);
6525        #[allow(clippy::absurd_extreme_comparisons)]
6526        #[allow(unused_comparisons)]
6527        if __tmp.remaining() < Self::ENCODED_LEN {
6528            panic!(
6529                "buffer is too small (need {} bytes, but got {})",
6530                Self::ENCODED_LEN,
6531                __tmp.remaining(),
6532            )
6533        }
6534        __tmp.put_u64_le(self.capabilities.bits() as u64);
6535        __tmp.put_u64_le(self.uid);
6536        __tmp.put_u32_le(self.flight_sw_version);
6537        __tmp.put_u32_le(self.middleware_sw_version);
6538        __tmp.put_u32_le(self.os_sw_version);
6539        __tmp.put_u32_le(self.board_version);
6540        __tmp.put_u16_le(self.vendor_id);
6541        __tmp.put_u16_le(self.product_id);
6542        for val in &self.flight_custom_version {
6543            __tmp.put_u8(*val);
6544        }
6545        for val in &self.middleware_custom_version {
6546            __tmp.put_u8(*val);
6547        }
6548        for val in &self.os_custom_version {
6549            __tmp.put_u8(*val);
6550        }
6551        if matches!(version, MavlinkVersion::V2) {
6552            for val in &self.uid2 {
6553                __tmp.put_u8(*val);
6554            }
6555            let len = __tmp.len();
6556            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6557        } else {
6558            __tmp.len()
6559        }
6560    }
6561}
6562#[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
6563#[doc = ""]
6564#[doc = "ID: 435"]
6565#[derive(Debug, Clone, PartialEq)]
6566#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6567#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6568#[cfg_attr(feature = "ts", derive(TS))]
6569#[cfg_attr(feature = "ts", ts(export))]
6570pub struct AVAILABLE_MODES_DATA {
6571    #[doc = "A bitfield for use for autopilot-specific flags"]
6572    pub custom_mode: u32,
6573    #[doc = "Mode properties."]
6574    pub properties: MavModeProperty,
6575    #[doc = "The total number of available modes for the current vehicle type."]
6576    pub number_modes: u8,
6577    #[doc = "The current mode index within number_modes, indexed from 1. The index is not guaranteed to be persistent, and may change between reboots or if the set of modes change."]
6578    pub mode_index: u8,
6579    #[doc = "Standard mode."]
6580    pub standard_mode: MavStandardMode,
6581    #[doc = "Name of custom mode, with null termination character. Should be omitted for standard modes."]
6582    #[cfg_attr(feature = "ts", ts(type = "string"))]
6583    pub mode_name: CharArray<35>,
6584}
6585impl AVAILABLE_MODES_DATA {
6586    pub const ENCODED_LEN: usize = 46usize;
6587    pub const DEFAULT: Self = Self {
6588        custom_mode: 0_u32,
6589        properties: MavModeProperty::DEFAULT,
6590        number_modes: 0_u8,
6591        mode_index: 0_u8,
6592        standard_mode: MavStandardMode::DEFAULT,
6593        mode_name: CharArray::new([0_u8; 35usize]),
6594    };
6595    #[cfg(feature = "arbitrary")]
6596    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6597        use arbitrary::{Arbitrary, Unstructured};
6598        let mut buf = [0u8; 1024];
6599        rng.fill_bytes(&mut buf);
6600        let mut unstructured = Unstructured::new(&buf);
6601        Self::arbitrary(&mut unstructured).unwrap_or_default()
6602    }
6603}
6604impl Default for AVAILABLE_MODES_DATA {
6605    fn default() -> Self {
6606        Self::DEFAULT.clone()
6607    }
6608}
6609impl MessageData for AVAILABLE_MODES_DATA {
6610    type Message = MavMessage;
6611    const ID: u32 = 435u32;
6612    const NAME: &'static str = "AVAILABLE_MODES";
6613    const EXTRA_CRC: u8 = 134u8;
6614    const ENCODED_LEN: usize = 46usize;
6615    fn deser(
6616        _version: MavlinkVersion,
6617        __input: &[u8],
6618    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6619        let avail_len = __input.len();
6620        let mut payload_buf = [0; Self::ENCODED_LEN];
6621        let mut buf = if avail_len < Self::ENCODED_LEN {
6622            payload_buf[0..avail_len].copy_from_slice(__input);
6623            Bytes::new(&payload_buf)
6624        } else {
6625            Bytes::new(__input)
6626        };
6627        let mut __struct = Self::default();
6628        __struct.custom_mode = buf.get_u32_le()?;
6629        let tmp = buf.get_u32_le()?;
6630        __struct.properties = MavModeProperty::from_bits(tmp as <MavModeProperty as Flags>::Bits)
6631            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6632            flag_type: "MavModeProperty",
6633            value: tmp as u64,
6634        })?;
6635        __struct.number_modes = buf.get_u8()?;
6636        __struct.mode_index = buf.get_u8()?;
6637        let tmp = buf.get_u8()?;
6638        __struct.standard_mode =
6639            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6640                enum_type: "MavStandardMode",
6641                value: tmp as u64,
6642            })?;
6643        let mut tmp = [0_u8; 35usize];
6644        for v in &mut tmp {
6645            *v = buf.get_u8()?;
6646        }
6647        __struct.mode_name = CharArray::new(tmp);
6648        Ok(__struct)
6649    }
6650    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6651        let mut __tmp = BytesMut::new(bytes);
6652        #[allow(clippy::absurd_extreme_comparisons)]
6653        #[allow(unused_comparisons)]
6654        if __tmp.remaining() < Self::ENCODED_LEN {
6655            panic!(
6656                "buffer is too small (need {} bytes, but got {})",
6657                Self::ENCODED_LEN,
6658                __tmp.remaining(),
6659            )
6660        }
6661        __tmp.put_u32_le(self.custom_mode);
6662        __tmp.put_u32_le(self.properties.bits() as u32);
6663        __tmp.put_u8(self.number_modes);
6664        __tmp.put_u8(self.mode_index);
6665        __tmp.put_u8(self.standard_mode as u8);
6666        for val in &self.mode_name {
6667            __tmp.put_u8(*val);
6668        }
6669        if matches!(version, MavlinkVersion::V2) {
6670            let len = __tmp.len();
6671            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6672        } else {
6673            __tmp.len()
6674        }
6675    }
6676}
6677#[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
6678#[doc = ""]
6679#[doc = "ID: 437"]
6680#[derive(Debug, Clone, PartialEq)]
6681#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6682#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6683#[cfg_attr(feature = "ts", derive(TS))]
6684#[cfg_attr(feature = "ts", ts(export))]
6685pub struct AVAILABLE_MODES_MONITOR_DATA {
6686    #[doc = "Sequence number. The value iterates sequentially whenever AVAILABLE_MODES changes (e.g. support for a new mode is added/removed dynamically)."]
6687    pub seq: u8,
6688}
6689impl AVAILABLE_MODES_MONITOR_DATA {
6690    pub const ENCODED_LEN: usize = 1usize;
6691    pub const DEFAULT: Self = Self { seq: 0_u8 };
6692    #[cfg(feature = "arbitrary")]
6693    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6694        use arbitrary::{Arbitrary, Unstructured};
6695        let mut buf = [0u8; 1024];
6696        rng.fill_bytes(&mut buf);
6697        let mut unstructured = Unstructured::new(&buf);
6698        Self::arbitrary(&mut unstructured).unwrap_or_default()
6699    }
6700}
6701impl Default for AVAILABLE_MODES_MONITOR_DATA {
6702    fn default() -> Self {
6703        Self::DEFAULT.clone()
6704    }
6705}
6706impl MessageData for AVAILABLE_MODES_MONITOR_DATA {
6707    type Message = MavMessage;
6708    const ID: u32 = 437u32;
6709    const NAME: &'static str = "AVAILABLE_MODES_MONITOR";
6710    const EXTRA_CRC: u8 = 30u8;
6711    const ENCODED_LEN: usize = 1usize;
6712    fn deser(
6713        _version: MavlinkVersion,
6714        __input: &[u8],
6715    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6716        let avail_len = __input.len();
6717        let mut payload_buf = [0; Self::ENCODED_LEN];
6718        let mut buf = if avail_len < Self::ENCODED_LEN {
6719            payload_buf[0..avail_len].copy_from_slice(__input);
6720            Bytes::new(&payload_buf)
6721        } else {
6722            Bytes::new(__input)
6723        };
6724        let mut __struct = Self::default();
6725        __struct.seq = buf.get_u8()?;
6726        Ok(__struct)
6727    }
6728    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6729        let mut __tmp = BytesMut::new(bytes);
6730        #[allow(clippy::absurd_extreme_comparisons)]
6731        #[allow(unused_comparisons)]
6732        if __tmp.remaining() < Self::ENCODED_LEN {
6733            panic!(
6734                "buffer is too small (need {} bytes, but got {})",
6735                Self::ENCODED_LEN,
6736                __tmp.remaining(),
6737            )
6738        }
6739        __tmp.put_u8(self.seq);
6740        if matches!(version, MavlinkVersion::V2) {
6741            let len = __tmp.len();
6742            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6743        } else {
6744            __tmp.len()
6745        }
6746    }
6747}
6748#[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
6749#[doc = ""]
6750#[doc = "ID: 372"]
6751#[derive(Debug, Clone, PartialEq)]
6752#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6753#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6754#[cfg_attr(feature = "ts", derive(TS))]
6755#[cfg_attr(feature = "ts", ts(export))]
6756pub struct BATTERY_INFO_DATA {
6757    #[doc = "Minimum per-cell voltage when discharging. 0: field not provided."]
6758    pub discharge_minimum_voltage: f32,
6759    #[doc = "Minimum per-cell voltage when charging. 0: field not provided."]
6760    pub charging_minimum_voltage: f32,
6761    #[doc = "Minimum per-cell voltage when resting. 0: field not provided."]
6762    pub resting_minimum_voltage: f32,
6763    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
6764    pub charging_maximum_voltage: f32,
6765    #[doc = "Maximum pack continuous charge current. 0: field not provided."]
6766    pub charging_maximum_current: f32,
6767    #[doc = "Battery nominal voltage. Used for conversion between Wh and Ah. 0: field not provided."]
6768    pub nominal_voltage: f32,
6769    #[doc = "Maximum pack discharge current. 0: field not provided."]
6770    pub discharge_maximum_current: f32,
6771    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
6772    pub discharge_maximum_burst_current: f32,
6773    #[doc = "Fully charged design capacity. 0: field not provided."]
6774    pub design_capacity: f32,
6775    #[doc = "Predicted battery capacity when fully charged (accounting for battery degradation). NAN: field not provided."]
6776    pub full_charge_capacity: f32,
6777    #[doc = "Lifetime count of the number of charge/discharge cycles (<https://en.wikipedia.org/wiki/Charge_cycle>). UINT16_MAX: field not provided."]
6778    pub cycle_count: u16,
6779    #[doc = "Battery weight. 0: field not provided."]
6780    pub weight: u16,
6781    #[doc = "Battery ID"]
6782    pub id: u8,
6783    #[doc = "Function of the battery."]
6784    pub battery_function: MavBatteryFunction,
6785    #[doc = "Type (chemistry) of the battery."]
6786    pub mavtype: MavBatteryType,
6787    #[doc = "State of Health (SOH) estimate. Typically 100% at the time of manufacture and will decrease over time and use. -1: field not provided."]
6788    pub state_of_health: u8,
6789    #[doc = "Number of battery cells in series. 0: field not provided."]
6790    pub cells_in_series: u8,
6791    #[doc = "Manufacture date (DDMMYYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
6792    #[cfg_attr(feature = "ts", ts(type = "string"))]
6793    pub manufacture_date: CharArray<9>,
6794    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
6795    #[cfg_attr(feature = "ts", ts(type = "string"))]
6796    pub serial_number: CharArray<32>,
6797    #[doc = "Battery device name. Formatted as manufacturer name then product name, separated with an underscore (in ASCII characters), 0 terminated. All 0: field not provided."]
6798    #[cfg_attr(feature = "ts", ts(type = "string"))]
6799    pub name: CharArray<50>,
6800}
6801impl BATTERY_INFO_DATA {
6802    pub const ENCODED_LEN: usize = 140usize;
6803    pub const DEFAULT: Self = Self {
6804        discharge_minimum_voltage: 0.0_f32,
6805        charging_minimum_voltage: 0.0_f32,
6806        resting_minimum_voltage: 0.0_f32,
6807        charging_maximum_voltage: 0.0_f32,
6808        charging_maximum_current: 0.0_f32,
6809        nominal_voltage: 0.0_f32,
6810        discharge_maximum_current: 0.0_f32,
6811        discharge_maximum_burst_current: 0.0_f32,
6812        design_capacity: 0.0_f32,
6813        full_charge_capacity: 0.0_f32,
6814        cycle_count: 0_u16,
6815        weight: 0_u16,
6816        id: 0_u8,
6817        battery_function: MavBatteryFunction::DEFAULT,
6818        mavtype: MavBatteryType::DEFAULT,
6819        state_of_health: 0_u8,
6820        cells_in_series: 0_u8,
6821        manufacture_date: CharArray::new([0_u8; 9usize]),
6822        serial_number: CharArray::new([0_u8; 32usize]),
6823        name: CharArray::new([0_u8; 50usize]),
6824    };
6825    #[cfg(feature = "arbitrary")]
6826    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6827        use arbitrary::{Arbitrary, Unstructured};
6828        let mut buf = [0u8; 1024];
6829        rng.fill_bytes(&mut buf);
6830        let mut unstructured = Unstructured::new(&buf);
6831        Self::arbitrary(&mut unstructured).unwrap_or_default()
6832    }
6833}
6834impl Default for BATTERY_INFO_DATA {
6835    fn default() -> Self {
6836        Self::DEFAULT.clone()
6837    }
6838}
6839impl MessageData for BATTERY_INFO_DATA {
6840    type Message = MavMessage;
6841    const ID: u32 = 372u32;
6842    const NAME: &'static str = "BATTERY_INFO";
6843    const EXTRA_CRC: u8 = 26u8;
6844    const ENCODED_LEN: usize = 140usize;
6845    fn deser(
6846        _version: MavlinkVersion,
6847        __input: &[u8],
6848    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6849        let avail_len = __input.len();
6850        let mut payload_buf = [0; Self::ENCODED_LEN];
6851        let mut buf = if avail_len < Self::ENCODED_LEN {
6852            payload_buf[0..avail_len].copy_from_slice(__input);
6853            Bytes::new(&payload_buf)
6854        } else {
6855            Bytes::new(__input)
6856        };
6857        let mut __struct = Self::default();
6858        __struct.discharge_minimum_voltage = buf.get_f32_le()?;
6859        __struct.charging_minimum_voltage = buf.get_f32_le()?;
6860        __struct.resting_minimum_voltage = buf.get_f32_le()?;
6861        __struct.charging_maximum_voltage = buf.get_f32_le()?;
6862        __struct.charging_maximum_current = buf.get_f32_le()?;
6863        __struct.nominal_voltage = buf.get_f32_le()?;
6864        __struct.discharge_maximum_current = buf.get_f32_le()?;
6865        __struct.discharge_maximum_burst_current = buf.get_f32_le()?;
6866        __struct.design_capacity = buf.get_f32_le()?;
6867        __struct.full_charge_capacity = buf.get_f32_le()?;
6868        __struct.cycle_count = buf.get_u16_le()?;
6869        __struct.weight = buf.get_u16_le()?;
6870        __struct.id = buf.get_u8()?;
6871        let tmp = buf.get_u8()?;
6872        __struct.battery_function =
6873            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6874                enum_type: "MavBatteryFunction",
6875                value: tmp as u64,
6876            })?;
6877        let tmp = buf.get_u8()?;
6878        __struct.mavtype =
6879            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6880                enum_type: "MavBatteryType",
6881                value: tmp as u64,
6882            })?;
6883        __struct.state_of_health = buf.get_u8()?;
6884        __struct.cells_in_series = buf.get_u8()?;
6885        let mut tmp = [0_u8; 9usize];
6886        for v in &mut tmp {
6887            *v = buf.get_u8()?;
6888        }
6889        __struct.manufacture_date = CharArray::new(tmp);
6890        let mut tmp = [0_u8; 32usize];
6891        for v in &mut tmp {
6892            *v = buf.get_u8()?;
6893        }
6894        __struct.serial_number = CharArray::new(tmp);
6895        let mut tmp = [0_u8; 50usize];
6896        for v in &mut tmp {
6897            *v = buf.get_u8()?;
6898        }
6899        __struct.name = CharArray::new(tmp);
6900        Ok(__struct)
6901    }
6902    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6903        let mut __tmp = BytesMut::new(bytes);
6904        #[allow(clippy::absurd_extreme_comparisons)]
6905        #[allow(unused_comparisons)]
6906        if __tmp.remaining() < Self::ENCODED_LEN {
6907            panic!(
6908                "buffer is too small (need {} bytes, but got {})",
6909                Self::ENCODED_LEN,
6910                __tmp.remaining(),
6911            )
6912        }
6913        __tmp.put_f32_le(self.discharge_minimum_voltage);
6914        __tmp.put_f32_le(self.charging_minimum_voltage);
6915        __tmp.put_f32_le(self.resting_minimum_voltage);
6916        __tmp.put_f32_le(self.charging_maximum_voltage);
6917        __tmp.put_f32_le(self.charging_maximum_current);
6918        __tmp.put_f32_le(self.nominal_voltage);
6919        __tmp.put_f32_le(self.discharge_maximum_current);
6920        __tmp.put_f32_le(self.discharge_maximum_burst_current);
6921        __tmp.put_f32_le(self.design_capacity);
6922        __tmp.put_f32_le(self.full_charge_capacity);
6923        __tmp.put_u16_le(self.cycle_count);
6924        __tmp.put_u16_le(self.weight);
6925        __tmp.put_u8(self.id);
6926        __tmp.put_u8(self.battery_function as u8);
6927        __tmp.put_u8(self.mavtype as u8);
6928        __tmp.put_u8(self.state_of_health);
6929        __tmp.put_u8(self.cells_in_series);
6930        for val in &self.manufacture_date {
6931            __tmp.put_u8(*val);
6932        }
6933        for val in &self.serial_number {
6934            __tmp.put_u8(*val);
6935        }
6936        for val in &self.name {
6937            __tmp.put_u8(*val);
6938        }
6939        if matches!(version, MavlinkVersion::V2) {
6940            let len = __tmp.len();
6941            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6942        } else {
6943            __tmp.len()
6944        }
6945    }
6946}
6947#[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
6948#[doc = ""]
6949#[doc = "ID: 147"]
6950#[derive(Debug, Clone, PartialEq)]
6951#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6952#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6953#[cfg_attr(feature = "ts", derive(TS))]
6954#[cfg_attr(feature = "ts", ts(export))]
6955pub struct BATTERY_STATUS_DATA {
6956    #[doc = "Consumed charge, -1: autopilot does not provide consumption estimate"]
6957    pub current_consumed: i32,
6958    #[doc = "Consumed energy, -1: autopilot does not provide energy consumption estimate"]
6959    pub energy_consumed: i32,
6960    #[doc = "Temperature of the battery. INT16_MAX for unknown temperature."]
6961    pub temperature: i16,
6962    #[doc = "Battery voltage of cells 1 to 10 (see voltages_ext for cells 11-14). Cells in this field above the valid cell count for this battery should have the UINT16_MAX value. If individual cell voltages are unknown or not measured for this battery, then the overall battery voltage should be filled in cell 0, with all others set to UINT16_MAX. If the voltage of the battery is greater than (UINT16_MAX - 1), then cell 0 should be set to (UINT16_MAX - 1), and cell 1 to the remaining voltage. This can be extended to multiple cells if the total voltage is greater than 2 * (UINT16_MAX - 1)."]
6963    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6964    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6965    pub voltages: [u16; 10],
6966    #[doc = "Battery current, -1: autopilot does not measure the current"]
6967    pub current_battery: i16,
6968    #[doc = "Battery ID"]
6969    pub id: u8,
6970    #[doc = "Function of the battery"]
6971    pub battery_function: MavBatteryFunction,
6972    #[doc = "Type (chemistry) of the battery"]
6973    pub mavtype: MavBatteryType,
6974    #[doc = "Remaining battery energy. Values: [0-100], -1: autopilot does not estimate the remaining battery."]
6975    pub battery_remaining: i8,
6976    #[doc = "Remaining battery time, 0: autopilot does not provide remaining battery time estimate"]
6977    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6978    pub time_remaining: i32,
6979    #[doc = "State for extent of discharge, provided by autopilot for warning or external reactions"]
6980    #[cfg_attr(feature = "serde", serde(default))]
6981    pub charge_state: MavBatteryChargeState,
6982    #[doc = "Battery voltages for cells 11 to 14. Cells above the valid cell count for this battery should have a value of 0, where zero indicates not supported (note, this is different than for the voltages field and allows empty byte truncation). If the measured value is 0 then 1 should be sent instead."]
6983    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6984    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6985    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
6986    pub voltages_ext: [u16; 4],
6987    #[doc = "Battery mode. Default (0) is that battery mode reporting is not supported or battery is in normal-use mode."]
6988    #[cfg_attr(feature = "serde", serde(default))]
6989    pub mode: MavBatteryMode,
6990    #[doc = "Fault/health indications. These should be set when charge_state is MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY (if not, fault reporting is not supported)."]
6991    #[cfg_attr(feature = "serde", serde(default))]
6992    pub fault_bitmask: MavBatteryFault,
6993}
6994impl BATTERY_STATUS_DATA {
6995    pub const ENCODED_LEN: usize = 54usize;
6996    pub const DEFAULT: Self = Self {
6997        current_consumed: 0_i32,
6998        energy_consumed: 0_i32,
6999        temperature: 0_i16,
7000        voltages: [0_u16; 10usize],
7001        current_battery: 0_i16,
7002        id: 0_u8,
7003        battery_function: MavBatteryFunction::DEFAULT,
7004        mavtype: MavBatteryType::DEFAULT,
7005        battery_remaining: 0_i8,
7006        time_remaining: 0_i32,
7007        charge_state: MavBatteryChargeState::DEFAULT,
7008        voltages_ext: [0_u16; 4usize],
7009        mode: MavBatteryMode::DEFAULT,
7010        fault_bitmask: MavBatteryFault::DEFAULT,
7011    };
7012    #[cfg(feature = "arbitrary")]
7013    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7014        use arbitrary::{Arbitrary, Unstructured};
7015        let mut buf = [0u8; 1024];
7016        rng.fill_bytes(&mut buf);
7017        let mut unstructured = Unstructured::new(&buf);
7018        Self::arbitrary(&mut unstructured).unwrap_or_default()
7019    }
7020}
7021impl Default for BATTERY_STATUS_DATA {
7022    fn default() -> Self {
7023        Self::DEFAULT.clone()
7024    }
7025}
7026impl MessageData for BATTERY_STATUS_DATA {
7027    type Message = MavMessage;
7028    const ID: u32 = 147u32;
7029    const NAME: &'static str = "BATTERY_STATUS";
7030    const EXTRA_CRC: u8 = 154u8;
7031    const ENCODED_LEN: usize = 54usize;
7032    fn deser(
7033        _version: MavlinkVersion,
7034        __input: &[u8],
7035    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7036        let avail_len = __input.len();
7037        let mut payload_buf = [0; Self::ENCODED_LEN];
7038        let mut buf = if avail_len < Self::ENCODED_LEN {
7039            payload_buf[0..avail_len].copy_from_slice(__input);
7040            Bytes::new(&payload_buf)
7041        } else {
7042            Bytes::new(__input)
7043        };
7044        let mut __struct = Self::default();
7045        __struct.current_consumed = buf.get_i32_le()?;
7046        __struct.energy_consumed = buf.get_i32_le()?;
7047        __struct.temperature = buf.get_i16_le()?;
7048        for v in &mut __struct.voltages {
7049            let val = buf.get_u16_le()?;
7050            *v = val;
7051        }
7052        __struct.current_battery = buf.get_i16_le()?;
7053        __struct.id = buf.get_u8()?;
7054        let tmp = buf.get_u8()?;
7055        __struct.battery_function =
7056            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7057                enum_type: "MavBatteryFunction",
7058                value: tmp as u64,
7059            })?;
7060        let tmp = buf.get_u8()?;
7061        __struct.mavtype =
7062            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7063                enum_type: "MavBatteryType",
7064                value: tmp as u64,
7065            })?;
7066        __struct.battery_remaining = buf.get_i8()?;
7067        __struct.time_remaining = buf.get_i32_le()?;
7068        let tmp = buf.get_u8()?;
7069        __struct.charge_state =
7070            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7071                enum_type: "MavBatteryChargeState",
7072                value: tmp as u64,
7073            })?;
7074        for v in &mut __struct.voltages_ext {
7075            let val = buf.get_u16_le()?;
7076            *v = val;
7077        }
7078        let tmp = buf.get_u8()?;
7079        __struct.mode =
7080            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7081                enum_type: "MavBatteryMode",
7082                value: tmp as u64,
7083            })?;
7084        let tmp = buf.get_u32_le()?;
7085        __struct.fault_bitmask = MavBatteryFault::from_bits(
7086            tmp as <MavBatteryFault as Flags>::Bits,
7087        )
7088        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
7089            flag_type: "MavBatteryFault",
7090            value: tmp as u64,
7091        })?;
7092        Ok(__struct)
7093    }
7094    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7095        let mut __tmp = BytesMut::new(bytes);
7096        #[allow(clippy::absurd_extreme_comparisons)]
7097        #[allow(unused_comparisons)]
7098        if __tmp.remaining() < Self::ENCODED_LEN {
7099            panic!(
7100                "buffer is too small (need {} bytes, but got {})",
7101                Self::ENCODED_LEN,
7102                __tmp.remaining(),
7103            )
7104        }
7105        __tmp.put_i32_le(self.current_consumed);
7106        __tmp.put_i32_le(self.energy_consumed);
7107        __tmp.put_i16_le(self.temperature);
7108        for val in &self.voltages {
7109            __tmp.put_u16_le(*val);
7110        }
7111        __tmp.put_i16_le(self.current_battery);
7112        __tmp.put_u8(self.id);
7113        __tmp.put_u8(self.battery_function as u8);
7114        __tmp.put_u8(self.mavtype as u8);
7115        __tmp.put_i8(self.battery_remaining);
7116        if matches!(version, MavlinkVersion::V2) {
7117            __tmp.put_i32_le(self.time_remaining);
7118            __tmp.put_u8(self.charge_state as u8);
7119            for val in &self.voltages_ext {
7120                __tmp.put_u16_le(*val);
7121            }
7122            __tmp.put_u8(self.mode as u8);
7123            __tmp.put_u32_le(self.fault_bitmask.bits() as u32);
7124            let len = __tmp.len();
7125            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7126        } else {
7127            __tmp.len()
7128        }
7129    }
7130}
7131#[doc = "Battery dynamic information.         This should be streamed (nominally at 1Hz).         Static/invariant battery information is sent in BATTERY_INFO.         Note that smart batteries should set the MAV_BATTERY_STATUS_FLAGS_CAPACITY_RELATIVE_TO_FULL bit to indicate that supplied capacity values are relative to a battery that is known to be full.         Power monitors would not set this bit, indicating that capacity_consumed is relative to drone power-on, and that other values are estimated based on the assumption that the battery was full on power-on."]
7132#[doc = ""]
7133#[doc = "ID: 369"]
7134#[derive(Debug, Clone, PartialEq)]
7135#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7136#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7137#[cfg_attr(feature = "ts", derive(TS))]
7138#[cfg_attr(feature = "ts", ts(export))]
7139pub struct BATTERY_STATUS_V2_DATA {
7140    #[doc = "Battery voltage (total). NaN: field not provided."]
7141    pub voltage: f32,
7142    #[doc = "Battery current (through all cells/loads). Positive value when discharging and negative if charging. NaN: field not provided."]
7143    pub current: f32,
7144    #[doc = "Consumed charge. NaN: field not provided. This is either the consumption since power-on or since the battery was full, depending on the value of MAV_BATTERY_STATUS_FLAGS_CAPACITY_RELATIVE_TO_FULL."]
7145    pub capacity_consumed: f32,
7146    #[doc = "Remaining charge (until empty). NaN: field not provided. Note: If MAV_BATTERY_STATUS_FLAGS_CAPACITY_RELATIVE_TO_FULL is unset, this value is based on the assumption the battery was full when the system was powered."]
7147    pub capacity_remaining: f32,
7148    #[doc = "Fault, health, readiness, and other status indications."]
7149    pub status_flags: MavBatteryStatusFlags,
7150    #[doc = "Temperature of the whole battery pack (not internal electronics). INT16_MAX field not provided."]
7151    pub temperature: i16,
7152    #[doc = "Battery ID"]
7153    pub id: u8,
7154    #[doc = "Remaining battery energy. Values: [0-100], UINT8_MAX: field not provided."]
7155    pub percent_remaining: u8,
7156}
7157impl BATTERY_STATUS_V2_DATA {
7158    pub const ENCODED_LEN: usize = 24usize;
7159    pub const DEFAULT: Self = Self {
7160        voltage: 0.0_f32,
7161        current: 0.0_f32,
7162        capacity_consumed: 0.0_f32,
7163        capacity_remaining: 0.0_f32,
7164        status_flags: MavBatteryStatusFlags::DEFAULT,
7165        temperature: 0_i16,
7166        id: 0_u8,
7167        percent_remaining: 0_u8,
7168    };
7169    #[cfg(feature = "arbitrary")]
7170    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7171        use arbitrary::{Arbitrary, Unstructured};
7172        let mut buf = [0u8; 1024];
7173        rng.fill_bytes(&mut buf);
7174        let mut unstructured = Unstructured::new(&buf);
7175        Self::arbitrary(&mut unstructured).unwrap_or_default()
7176    }
7177}
7178impl Default for BATTERY_STATUS_V2_DATA {
7179    fn default() -> Self {
7180        Self::DEFAULT.clone()
7181    }
7182}
7183impl MessageData for BATTERY_STATUS_V2_DATA {
7184    type Message = MavMessage;
7185    const ID: u32 = 369u32;
7186    const NAME: &'static str = "BATTERY_STATUS_V2";
7187    const EXTRA_CRC: u8 = 151u8;
7188    const ENCODED_LEN: usize = 24usize;
7189    fn deser(
7190        _version: MavlinkVersion,
7191        __input: &[u8],
7192    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7193        let avail_len = __input.len();
7194        let mut payload_buf = [0; Self::ENCODED_LEN];
7195        let mut buf = if avail_len < Self::ENCODED_LEN {
7196            payload_buf[0..avail_len].copy_from_slice(__input);
7197            Bytes::new(&payload_buf)
7198        } else {
7199            Bytes::new(__input)
7200        };
7201        let mut __struct = Self::default();
7202        __struct.voltage = buf.get_f32_le()?;
7203        __struct.current = buf.get_f32_le()?;
7204        __struct.capacity_consumed = buf.get_f32_le()?;
7205        __struct.capacity_remaining = buf.get_f32_le()?;
7206        let tmp = buf.get_u32_le()?;
7207        __struct.status_flags = MavBatteryStatusFlags::from_bits(
7208            tmp as <MavBatteryStatusFlags as Flags>::Bits,
7209        )
7210        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
7211            flag_type: "MavBatteryStatusFlags",
7212            value: tmp as u64,
7213        })?;
7214        __struct.temperature = buf.get_i16_le()?;
7215        __struct.id = buf.get_u8()?;
7216        __struct.percent_remaining = buf.get_u8()?;
7217        Ok(__struct)
7218    }
7219    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7220        let mut __tmp = BytesMut::new(bytes);
7221        #[allow(clippy::absurd_extreme_comparisons)]
7222        #[allow(unused_comparisons)]
7223        if __tmp.remaining() < Self::ENCODED_LEN {
7224            panic!(
7225                "buffer is too small (need {} bytes, but got {})",
7226                Self::ENCODED_LEN,
7227                __tmp.remaining(),
7228            )
7229        }
7230        __tmp.put_f32_le(self.voltage);
7231        __tmp.put_f32_le(self.current);
7232        __tmp.put_f32_le(self.capacity_consumed);
7233        __tmp.put_f32_le(self.capacity_remaining);
7234        __tmp.put_u32_le(self.status_flags.bits() as u32);
7235        __tmp.put_i16_le(self.temperature);
7236        __tmp.put_u8(self.id);
7237        __tmp.put_u8(self.percent_remaining);
7238        if matches!(version, MavlinkVersion::V2) {
7239            let len = __tmp.len();
7240            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7241        } else {
7242            __tmp.len()
7243        }
7244    }
7245}
7246#[doc = "Report button state change."]
7247#[doc = ""]
7248#[doc = "ID: 257"]
7249#[derive(Debug, Clone, PartialEq)]
7250#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7251#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7252#[cfg_attr(feature = "ts", derive(TS))]
7253#[cfg_attr(feature = "ts", ts(export))]
7254pub struct BUTTON_CHANGE_DATA {
7255    #[doc = "Timestamp (time since system boot)."]
7256    pub time_boot_ms: u32,
7257    #[doc = "Time of last change of button state."]
7258    pub last_change_ms: u32,
7259    #[doc = "Bitmap for state of buttons."]
7260    pub state: u8,
7261}
7262impl BUTTON_CHANGE_DATA {
7263    pub const ENCODED_LEN: usize = 9usize;
7264    pub const DEFAULT: Self = Self {
7265        time_boot_ms: 0_u32,
7266        last_change_ms: 0_u32,
7267        state: 0_u8,
7268    };
7269    #[cfg(feature = "arbitrary")]
7270    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7271        use arbitrary::{Arbitrary, Unstructured};
7272        let mut buf = [0u8; 1024];
7273        rng.fill_bytes(&mut buf);
7274        let mut unstructured = Unstructured::new(&buf);
7275        Self::arbitrary(&mut unstructured).unwrap_or_default()
7276    }
7277}
7278impl Default for BUTTON_CHANGE_DATA {
7279    fn default() -> Self {
7280        Self::DEFAULT.clone()
7281    }
7282}
7283impl MessageData for BUTTON_CHANGE_DATA {
7284    type Message = MavMessage;
7285    const ID: u32 = 257u32;
7286    const NAME: &'static str = "BUTTON_CHANGE";
7287    const EXTRA_CRC: u8 = 131u8;
7288    const ENCODED_LEN: usize = 9usize;
7289    fn deser(
7290        _version: MavlinkVersion,
7291        __input: &[u8],
7292    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7293        let avail_len = __input.len();
7294        let mut payload_buf = [0; Self::ENCODED_LEN];
7295        let mut buf = if avail_len < Self::ENCODED_LEN {
7296            payload_buf[0..avail_len].copy_from_slice(__input);
7297            Bytes::new(&payload_buf)
7298        } else {
7299            Bytes::new(__input)
7300        };
7301        let mut __struct = Self::default();
7302        __struct.time_boot_ms = buf.get_u32_le()?;
7303        __struct.last_change_ms = buf.get_u32_le()?;
7304        __struct.state = buf.get_u8()?;
7305        Ok(__struct)
7306    }
7307    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7308        let mut __tmp = BytesMut::new(bytes);
7309        #[allow(clippy::absurd_extreme_comparisons)]
7310        #[allow(unused_comparisons)]
7311        if __tmp.remaining() < Self::ENCODED_LEN {
7312            panic!(
7313                "buffer is too small (need {} bytes, but got {})",
7314                Self::ENCODED_LEN,
7315                __tmp.remaining(),
7316            )
7317        }
7318        __tmp.put_u32_le(self.time_boot_ms);
7319        __tmp.put_u32_le(self.last_change_ms);
7320        __tmp.put_u8(self.state);
7321        if matches!(version, MavlinkVersion::V2) {
7322            let len = __tmp.len();
7323            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7324        } else {
7325            __tmp.len()
7326        }
7327    }
7328}
7329#[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7330#[doc = ""]
7331#[doc = "ID: 262"]
7332#[derive(Debug, Clone, PartialEq)]
7333#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7334#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7335#[cfg_attr(feature = "ts", derive(TS))]
7336#[cfg_attr(feature = "ts", ts(export))]
7337pub struct CAMERA_CAPTURE_STATUS_DATA {
7338    #[doc = "Timestamp (time since system boot)."]
7339    pub time_boot_ms: u32,
7340    #[doc = "Image capture interval"]
7341    pub image_interval: f32,
7342    #[doc = "Elapsed time since recording started (0: Not supported/available). A GCS should compute recording time and use non-zero values of this field to correct any discrepancy."]
7343    pub recording_time_ms: u32,
7344    #[doc = "Available storage capacity."]
7345    pub available_capacity: f32,
7346    #[doc = "Current status of image capturing (0: idle, 1: capture in progress, 2: interval set but idle, 3: interval set and capture in progress)"]
7347    pub image_status: u8,
7348    #[doc = "Current status of video capturing (0: idle, 1: capture in progress)"]
7349    pub video_status: u8,
7350    #[doc = "Total number of images captured ('forever', or until reset using MAV_CMD_STORAGE_FORMAT)."]
7351    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7352    pub image_count: i32,
7353    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7354    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7355    pub camera_device_id: u8,
7356}
7357impl CAMERA_CAPTURE_STATUS_DATA {
7358    pub const ENCODED_LEN: usize = 23usize;
7359    pub const DEFAULT: Self = Self {
7360        time_boot_ms: 0_u32,
7361        image_interval: 0.0_f32,
7362        recording_time_ms: 0_u32,
7363        available_capacity: 0.0_f32,
7364        image_status: 0_u8,
7365        video_status: 0_u8,
7366        image_count: 0_i32,
7367        camera_device_id: 0_u8,
7368    };
7369    #[cfg(feature = "arbitrary")]
7370    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7371        use arbitrary::{Arbitrary, Unstructured};
7372        let mut buf = [0u8; 1024];
7373        rng.fill_bytes(&mut buf);
7374        let mut unstructured = Unstructured::new(&buf);
7375        Self::arbitrary(&mut unstructured).unwrap_or_default()
7376    }
7377}
7378impl Default for CAMERA_CAPTURE_STATUS_DATA {
7379    fn default() -> Self {
7380        Self::DEFAULT.clone()
7381    }
7382}
7383impl MessageData for CAMERA_CAPTURE_STATUS_DATA {
7384    type Message = MavMessage;
7385    const ID: u32 = 262u32;
7386    const NAME: &'static str = "CAMERA_CAPTURE_STATUS";
7387    const EXTRA_CRC: u8 = 12u8;
7388    const ENCODED_LEN: usize = 23usize;
7389    fn deser(
7390        _version: MavlinkVersion,
7391        __input: &[u8],
7392    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7393        let avail_len = __input.len();
7394        let mut payload_buf = [0; Self::ENCODED_LEN];
7395        let mut buf = if avail_len < Self::ENCODED_LEN {
7396            payload_buf[0..avail_len].copy_from_slice(__input);
7397            Bytes::new(&payload_buf)
7398        } else {
7399            Bytes::new(__input)
7400        };
7401        let mut __struct = Self::default();
7402        __struct.time_boot_ms = buf.get_u32_le()?;
7403        __struct.image_interval = buf.get_f32_le()?;
7404        __struct.recording_time_ms = buf.get_u32_le()?;
7405        __struct.available_capacity = buf.get_f32_le()?;
7406        __struct.image_status = buf.get_u8()?;
7407        __struct.video_status = buf.get_u8()?;
7408        __struct.image_count = buf.get_i32_le()?;
7409        __struct.camera_device_id = buf.get_u8()?;
7410        Ok(__struct)
7411    }
7412    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7413        let mut __tmp = BytesMut::new(bytes);
7414        #[allow(clippy::absurd_extreme_comparisons)]
7415        #[allow(unused_comparisons)]
7416        if __tmp.remaining() < Self::ENCODED_LEN {
7417            panic!(
7418                "buffer is too small (need {} bytes, but got {})",
7419                Self::ENCODED_LEN,
7420                __tmp.remaining(),
7421            )
7422        }
7423        __tmp.put_u32_le(self.time_boot_ms);
7424        __tmp.put_f32_le(self.image_interval);
7425        __tmp.put_u32_le(self.recording_time_ms);
7426        __tmp.put_f32_le(self.available_capacity);
7427        __tmp.put_u8(self.image_status);
7428        __tmp.put_u8(self.video_status);
7429        if matches!(version, MavlinkVersion::V2) {
7430            __tmp.put_i32_le(self.image_count);
7431            __tmp.put_u8(self.camera_device_id);
7432            let len = __tmp.len();
7433            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7434        } else {
7435            __tmp.len()
7436        }
7437    }
7438}
7439#[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7440#[doc = ""]
7441#[doc = "ID: 271"]
7442#[derive(Debug, Clone, PartialEq)]
7443#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7444#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7445#[cfg_attr(feature = "ts", derive(TS))]
7446#[cfg_attr(feature = "ts", ts(export))]
7447pub struct CAMERA_FOV_STATUS_DATA {
7448    #[doc = "Timestamp (time since system boot)."]
7449    pub time_boot_ms: u32,
7450    #[doc = "Latitude of camera (INT32_MAX if unknown)."]
7451    pub lat_camera: i32,
7452    #[doc = "Longitude of camera (INT32_MAX if unknown)."]
7453    pub lon_camera: i32,
7454    #[doc = "Altitude (MSL) of camera (INT32_MAX if unknown)."]
7455    pub alt_camera: i32,
7456    #[doc = "Latitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7457    pub lat_image: i32,
7458    #[doc = "Longitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7459    pub lon_image: i32,
7460    #[doc = "Altitude (MSL) of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
7461    pub alt_image: i32,
7462    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
7463    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7464    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7465    pub q: [f32; 4],
7466    #[doc = "Horizontal field of view (NaN if unknown)."]
7467    pub hfov: f32,
7468    #[doc = "Vertical field of view (NaN if unknown)."]
7469    pub vfov: f32,
7470    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7471    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7472    pub camera_device_id: u8,
7473}
7474impl CAMERA_FOV_STATUS_DATA {
7475    pub const ENCODED_LEN: usize = 53usize;
7476    pub const DEFAULT: Self = Self {
7477        time_boot_ms: 0_u32,
7478        lat_camera: 0_i32,
7479        lon_camera: 0_i32,
7480        alt_camera: 0_i32,
7481        lat_image: 0_i32,
7482        lon_image: 0_i32,
7483        alt_image: 0_i32,
7484        q: [0.0_f32; 4usize],
7485        hfov: 0.0_f32,
7486        vfov: 0.0_f32,
7487        camera_device_id: 0_u8,
7488    };
7489    #[cfg(feature = "arbitrary")]
7490    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7491        use arbitrary::{Arbitrary, Unstructured};
7492        let mut buf = [0u8; 1024];
7493        rng.fill_bytes(&mut buf);
7494        let mut unstructured = Unstructured::new(&buf);
7495        Self::arbitrary(&mut unstructured).unwrap_or_default()
7496    }
7497}
7498impl Default for CAMERA_FOV_STATUS_DATA {
7499    fn default() -> Self {
7500        Self::DEFAULT.clone()
7501    }
7502}
7503impl MessageData for CAMERA_FOV_STATUS_DATA {
7504    type Message = MavMessage;
7505    const ID: u32 = 271u32;
7506    const NAME: &'static str = "CAMERA_FOV_STATUS";
7507    const EXTRA_CRC: u8 = 22u8;
7508    const ENCODED_LEN: usize = 53usize;
7509    fn deser(
7510        _version: MavlinkVersion,
7511        __input: &[u8],
7512    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7513        let avail_len = __input.len();
7514        let mut payload_buf = [0; Self::ENCODED_LEN];
7515        let mut buf = if avail_len < Self::ENCODED_LEN {
7516            payload_buf[0..avail_len].copy_from_slice(__input);
7517            Bytes::new(&payload_buf)
7518        } else {
7519            Bytes::new(__input)
7520        };
7521        let mut __struct = Self::default();
7522        __struct.time_boot_ms = buf.get_u32_le()?;
7523        __struct.lat_camera = buf.get_i32_le()?;
7524        __struct.lon_camera = buf.get_i32_le()?;
7525        __struct.alt_camera = buf.get_i32_le()?;
7526        __struct.lat_image = buf.get_i32_le()?;
7527        __struct.lon_image = buf.get_i32_le()?;
7528        __struct.alt_image = buf.get_i32_le()?;
7529        for v in &mut __struct.q {
7530            let val = buf.get_f32_le()?;
7531            *v = val;
7532        }
7533        __struct.hfov = buf.get_f32_le()?;
7534        __struct.vfov = buf.get_f32_le()?;
7535        __struct.camera_device_id = buf.get_u8()?;
7536        Ok(__struct)
7537    }
7538    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7539        let mut __tmp = BytesMut::new(bytes);
7540        #[allow(clippy::absurd_extreme_comparisons)]
7541        #[allow(unused_comparisons)]
7542        if __tmp.remaining() < Self::ENCODED_LEN {
7543            panic!(
7544                "buffer is too small (need {} bytes, but got {})",
7545                Self::ENCODED_LEN,
7546                __tmp.remaining(),
7547            )
7548        }
7549        __tmp.put_u32_le(self.time_boot_ms);
7550        __tmp.put_i32_le(self.lat_camera);
7551        __tmp.put_i32_le(self.lon_camera);
7552        __tmp.put_i32_le(self.alt_camera);
7553        __tmp.put_i32_le(self.lat_image);
7554        __tmp.put_i32_le(self.lon_image);
7555        __tmp.put_i32_le(self.alt_image);
7556        for val in &self.q {
7557            __tmp.put_f32_le(*val);
7558        }
7559        __tmp.put_f32_le(self.hfov);
7560        __tmp.put_f32_le(self.vfov);
7561        if matches!(version, MavlinkVersion::V2) {
7562            __tmp.put_u8(self.camera_device_id);
7563            let len = __tmp.len();
7564            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7565        } else {
7566            __tmp.len()
7567        }
7568    }
7569}
7570#[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
7571#[doc = ""]
7572#[doc = "ID: 263"]
7573#[derive(Debug, Clone, PartialEq)]
7574#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7575#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7576#[cfg_attr(feature = "ts", derive(TS))]
7577#[cfg_attr(feature = "ts", ts(export))]
7578pub struct CAMERA_IMAGE_CAPTURED_DATA {
7579    #[doc = "Timestamp (time since UNIX epoch) in UTC. 0 for unknown."]
7580    pub time_utc: u64,
7581    #[doc = "Timestamp (time since system boot)."]
7582    pub time_boot_ms: u32,
7583    #[doc = "Latitude where image was taken"]
7584    pub lat: i32,
7585    #[doc = "Longitude where capture was taken"]
7586    pub lon: i32,
7587    #[doc = "Altitude (MSL) where image was taken"]
7588    pub alt: i32,
7589    #[doc = "Altitude above ground"]
7590    pub relative_alt: i32,
7591    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
7592    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7593    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7594    pub q: [f32; 4],
7595    #[doc = "Zero based index of this image (i.e. a new image will have index CAMERA_CAPTURE_STATUS.image count -1)"]
7596    pub image_index: i32,
7597    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id). Field name is usually camera_device_id."]
7598    pub camera_id: u8,
7599    #[doc = "Boolean indicating success (1) or failure (0) while capturing this image."]
7600    pub capture_result: i8,
7601    #[doc = "URL of image taken. Either local storage or <http://foo.jpg> if camera provides an HTTP interface."]
7602    #[cfg_attr(feature = "ts", ts(type = "string"))]
7603    pub file_url: CharArray<205>,
7604}
7605impl CAMERA_IMAGE_CAPTURED_DATA {
7606    pub const ENCODED_LEN: usize = 255usize;
7607    pub const DEFAULT: Self = Self {
7608        time_utc: 0_u64,
7609        time_boot_ms: 0_u32,
7610        lat: 0_i32,
7611        lon: 0_i32,
7612        alt: 0_i32,
7613        relative_alt: 0_i32,
7614        q: [0.0_f32; 4usize],
7615        image_index: 0_i32,
7616        camera_id: 0_u8,
7617        capture_result: 0_i8,
7618        file_url: CharArray::new([0_u8; 205usize]),
7619    };
7620    #[cfg(feature = "arbitrary")]
7621    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7622        use arbitrary::{Arbitrary, Unstructured};
7623        let mut buf = [0u8; 1024];
7624        rng.fill_bytes(&mut buf);
7625        let mut unstructured = Unstructured::new(&buf);
7626        Self::arbitrary(&mut unstructured).unwrap_or_default()
7627    }
7628}
7629impl Default for CAMERA_IMAGE_CAPTURED_DATA {
7630    fn default() -> Self {
7631        Self::DEFAULT.clone()
7632    }
7633}
7634impl MessageData for CAMERA_IMAGE_CAPTURED_DATA {
7635    type Message = MavMessage;
7636    const ID: u32 = 263u32;
7637    const NAME: &'static str = "CAMERA_IMAGE_CAPTURED";
7638    const EXTRA_CRC: u8 = 133u8;
7639    const ENCODED_LEN: usize = 255usize;
7640    fn deser(
7641        _version: MavlinkVersion,
7642        __input: &[u8],
7643    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7644        let avail_len = __input.len();
7645        let mut payload_buf = [0; Self::ENCODED_LEN];
7646        let mut buf = if avail_len < Self::ENCODED_LEN {
7647            payload_buf[0..avail_len].copy_from_slice(__input);
7648            Bytes::new(&payload_buf)
7649        } else {
7650            Bytes::new(__input)
7651        };
7652        let mut __struct = Self::default();
7653        __struct.time_utc = buf.get_u64_le()?;
7654        __struct.time_boot_ms = buf.get_u32_le()?;
7655        __struct.lat = buf.get_i32_le()?;
7656        __struct.lon = buf.get_i32_le()?;
7657        __struct.alt = buf.get_i32_le()?;
7658        __struct.relative_alt = buf.get_i32_le()?;
7659        for v in &mut __struct.q {
7660            let val = buf.get_f32_le()?;
7661            *v = val;
7662        }
7663        __struct.image_index = buf.get_i32_le()?;
7664        __struct.camera_id = buf.get_u8()?;
7665        __struct.capture_result = buf.get_i8()?;
7666        let mut tmp = [0_u8; 205usize];
7667        for v in &mut tmp {
7668            *v = buf.get_u8()?;
7669        }
7670        __struct.file_url = CharArray::new(tmp);
7671        Ok(__struct)
7672    }
7673    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7674        let mut __tmp = BytesMut::new(bytes);
7675        #[allow(clippy::absurd_extreme_comparisons)]
7676        #[allow(unused_comparisons)]
7677        if __tmp.remaining() < Self::ENCODED_LEN {
7678            panic!(
7679                "buffer is too small (need {} bytes, but got {})",
7680                Self::ENCODED_LEN,
7681                __tmp.remaining(),
7682            )
7683        }
7684        __tmp.put_u64_le(self.time_utc);
7685        __tmp.put_u32_le(self.time_boot_ms);
7686        __tmp.put_i32_le(self.lat);
7687        __tmp.put_i32_le(self.lon);
7688        __tmp.put_i32_le(self.alt);
7689        __tmp.put_i32_le(self.relative_alt);
7690        for val in &self.q {
7691            __tmp.put_f32_le(*val);
7692        }
7693        __tmp.put_i32_le(self.image_index);
7694        __tmp.put_u8(self.camera_id);
7695        __tmp.put_i8(self.capture_result);
7696        for val in &self.file_url {
7697            __tmp.put_u8(*val);
7698        }
7699        if matches!(version, MavlinkVersion::V2) {
7700            let len = __tmp.len();
7701            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7702        } else {
7703            __tmp.len()
7704        }
7705    }
7706}
7707#[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7708#[doc = ""]
7709#[doc = "ID: 259"]
7710#[derive(Debug, Clone, PartialEq)]
7711#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7712#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7713#[cfg_attr(feature = "ts", derive(TS))]
7714#[cfg_attr(feature = "ts", ts(export))]
7715pub struct CAMERA_INFORMATION_DATA {
7716    #[doc = "Timestamp (time since system boot)."]
7717    pub time_boot_ms: u32,
7718    #[doc = "0xff). Use 0 if not known."]
7719    pub firmware_version: u32,
7720    #[doc = "Focal length. Use NaN if not known."]
7721    pub focal_length: f32,
7722    #[doc = "Image sensor size horizontal. Use NaN if not known."]
7723    pub sensor_size_h: f32,
7724    #[doc = "Image sensor size vertical. Use NaN if not known."]
7725    pub sensor_size_v: f32,
7726    #[doc = "Bitmap of camera capability flags."]
7727    pub flags: CameraCapFlags,
7728    #[doc = "Horizontal image resolution. Use 0 if not known."]
7729    pub resolution_h: u16,
7730    #[doc = "Vertical image resolution. Use 0 if not known."]
7731    pub resolution_v: u16,
7732    #[doc = "Camera definition version (iteration).  Use 0 if not known."]
7733    pub cam_definition_version: u16,
7734    #[doc = "Name of the camera vendor"]
7735    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7736    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7737    pub vendor_name: [u8; 32],
7738    #[doc = "Name of the camera model"]
7739    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7740    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
7741    pub model_name: [u8; 32],
7742    #[doc = "Reserved for a lens ID.  Use 0 if not known."]
7743    pub lens_id: u8,
7744    #[doc = "Camera definition URI (if any, otherwise only basic functions will be available). HTTP- (http://) and MAVLink FTP- (mavlinkftp://) formatted URIs are allowed (and both must be supported by any GCS that implements the Camera Protocol). The definition file may be xz compressed, which will be indicated by the file extension .xml.xz (a GCS that implements the protocol must support decompressing the file). The string needs to be zero terminated.  Use a zero-length string if not known."]
7745    #[cfg_attr(feature = "ts", ts(type = "string"))]
7746    pub cam_definition_uri: CharArray<140>,
7747    #[doc = "Gimbal id of a gimbal associated with this camera. This is the component id of the gimbal device, or 1-6 for non mavlink gimbals. Use 0 if no gimbal is associated with the camera."]
7748    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7749    pub gimbal_device_id: u8,
7750    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7751    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7752    pub camera_device_id: u8,
7753}
7754impl CAMERA_INFORMATION_DATA {
7755    pub const ENCODED_LEN: usize = 237usize;
7756    pub const DEFAULT: Self = Self {
7757        time_boot_ms: 0_u32,
7758        firmware_version: 0_u32,
7759        focal_length: 0.0_f32,
7760        sensor_size_h: 0.0_f32,
7761        sensor_size_v: 0.0_f32,
7762        flags: CameraCapFlags::DEFAULT,
7763        resolution_h: 0_u16,
7764        resolution_v: 0_u16,
7765        cam_definition_version: 0_u16,
7766        vendor_name: [0_u8; 32usize],
7767        model_name: [0_u8; 32usize],
7768        lens_id: 0_u8,
7769        cam_definition_uri: CharArray::new([0_u8; 140usize]),
7770        gimbal_device_id: 0_u8,
7771        camera_device_id: 0_u8,
7772    };
7773    #[cfg(feature = "arbitrary")]
7774    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7775        use arbitrary::{Arbitrary, Unstructured};
7776        let mut buf = [0u8; 1024];
7777        rng.fill_bytes(&mut buf);
7778        let mut unstructured = Unstructured::new(&buf);
7779        Self::arbitrary(&mut unstructured).unwrap_or_default()
7780    }
7781}
7782impl Default for CAMERA_INFORMATION_DATA {
7783    fn default() -> Self {
7784        Self::DEFAULT.clone()
7785    }
7786}
7787impl MessageData for CAMERA_INFORMATION_DATA {
7788    type Message = MavMessage;
7789    const ID: u32 = 259u32;
7790    const NAME: &'static str = "CAMERA_INFORMATION";
7791    const EXTRA_CRC: u8 = 92u8;
7792    const ENCODED_LEN: usize = 237usize;
7793    fn deser(
7794        _version: MavlinkVersion,
7795        __input: &[u8],
7796    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7797        let avail_len = __input.len();
7798        let mut payload_buf = [0; Self::ENCODED_LEN];
7799        let mut buf = if avail_len < Self::ENCODED_LEN {
7800            payload_buf[0..avail_len].copy_from_slice(__input);
7801            Bytes::new(&payload_buf)
7802        } else {
7803            Bytes::new(__input)
7804        };
7805        let mut __struct = Self::default();
7806        __struct.time_boot_ms = buf.get_u32_le()?;
7807        __struct.firmware_version = buf.get_u32_le()?;
7808        __struct.focal_length = buf.get_f32_le()?;
7809        __struct.sensor_size_h = buf.get_f32_le()?;
7810        __struct.sensor_size_v = buf.get_f32_le()?;
7811        let tmp = buf.get_u32_le()?;
7812        __struct.flags = CameraCapFlags::from_bits(tmp as <CameraCapFlags as Flags>::Bits).ok_or(
7813            ::mavlink_core::error::ParserError::InvalidFlag {
7814                flag_type: "CameraCapFlags",
7815                value: tmp as u64,
7816            },
7817        )?;
7818        __struct.resolution_h = buf.get_u16_le()?;
7819        __struct.resolution_v = buf.get_u16_le()?;
7820        __struct.cam_definition_version = buf.get_u16_le()?;
7821        for v in &mut __struct.vendor_name {
7822            let val = buf.get_u8()?;
7823            *v = val;
7824        }
7825        for v in &mut __struct.model_name {
7826            let val = buf.get_u8()?;
7827            *v = val;
7828        }
7829        __struct.lens_id = buf.get_u8()?;
7830        let mut tmp = [0_u8; 140usize];
7831        for v in &mut tmp {
7832            *v = buf.get_u8()?;
7833        }
7834        __struct.cam_definition_uri = CharArray::new(tmp);
7835        __struct.gimbal_device_id = buf.get_u8()?;
7836        __struct.camera_device_id = buf.get_u8()?;
7837        Ok(__struct)
7838    }
7839    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7840        let mut __tmp = BytesMut::new(bytes);
7841        #[allow(clippy::absurd_extreme_comparisons)]
7842        #[allow(unused_comparisons)]
7843        if __tmp.remaining() < Self::ENCODED_LEN {
7844            panic!(
7845                "buffer is too small (need {} bytes, but got {})",
7846                Self::ENCODED_LEN,
7847                __tmp.remaining(),
7848            )
7849        }
7850        __tmp.put_u32_le(self.time_boot_ms);
7851        __tmp.put_u32_le(self.firmware_version);
7852        __tmp.put_f32_le(self.focal_length);
7853        __tmp.put_f32_le(self.sensor_size_h);
7854        __tmp.put_f32_le(self.sensor_size_v);
7855        __tmp.put_u32_le(self.flags.bits() as u32);
7856        __tmp.put_u16_le(self.resolution_h);
7857        __tmp.put_u16_le(self.resolution_v);
7858        __tmp.put_u16_le(self.cam_definition_version);
7859        for val in &self.vendor_name {
7860            __tmp.put_u8(*val);
7861        }
7862        for val in &self.model_name {
7863            __tmp.put_u8(*val);
7864        }
7865        __tmp.put_u8(self.lens_id);
7866        for val in &self.cam_definition_uri {
7867            __tmp.put_u8(*val);
7868        }
7869        if matches!(version, MavlinkVersion::V2) {
7870            __tmp.put_u8(self.gimbal_device_id);
7871            __tmp.put_u8(self.camera_device_id);
7872            let len = __tmp.len();
7873            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7874        } else {
7875            __tmp.len()
7876        }
7877    }
7878}
7879#[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7880#[doc = ""]
7881#[doc = "ID: 260"]
7882#[derive(Debug, Clone, PartialEq)]
7883#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7884#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7885#[cfg_attr(feature = "ts", derive(TS))]
7886#[cfg_attr(feature = "ts", ts(export))]
7887pub struct CAMERA_SETTINGS_DATA {
7888    #[doc = "Timestamp (time since system boot)."]
7889    pub time_boot_ms: u32,
7890    #[doc = "Camera mode"]
7891    pub mode_id: CameraMode,
7892    #[doc = "Current zoom level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
7893    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7894    pub zoomLevel: f32,
7895    #[doc = "Current focus level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
7896    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7897    pub focusLevel: f32,
7898    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7899    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7900    pub camera_device_id: u8,
7901}
7902impl CAMERA_SETTINGS_DATA {
7903    pub const ENCODED_LEN: usize = 14usize;
7904    pub const DEFAULT: Self = Self {
7905        time_boot_ms: 0_u32,
7906        mode_id: CameraMode::DEFAULT,
7907        zoomLevel: 0.0_f32,
7908        focusLevel: 0.0_f32,
7909        camera_device_id: 0_u8,
7910    };
7911    #[cfg(feature = "arbitrary")]
7912    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7913        use arbitrary::{Arbitrary, Unstructured};
7914        let mut buf = [0u8; 1024];
7915        rng.fill_bytes(&mut buf);
7916        let mut unstructured = Unstructured::new(&buf);
7917        Self::arbitrary(&mut unstructured).unwrap_or_default()
7918    }
7919}
7920impl Default for CAMERA_SETTINGS_DATA {
7921    fn default() -> Self {
7922        Self::DEFAULT.clone()
7923    }
7924}
7925impl MessageData for CAMERA_SETTINGS_DATA {
7926    type Message = MavMessage;
7927    const ID: u32 = 260u32;
7928    const NAME: &'static str = "CAMERA_SETTINGS";
7929    const EXTRA_CRC: u8 = 146u8;
7930    const ENCODED_LEN: usize = 14usize;
7931    fn deser(
7932        _version: MavlinkVersion,
7933        __input: &[u8],
7934    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7935        let avail_len = __input.len();
7936        let mut payload_buf = [0; Self::ENCODED_LEN];
7937        let mut buf = if avail_len < Self::ENCODED_LEN {
7938            payload_buf[0..avail_len].copy_from_slice(__input);
7939            Bytes::new(&payload_buf)
7940        } else {
7941            Bytes::new(__input)
7942        };
7943        let mut __struct = Self::default();
7944        __struct.time_boot_ms = buf.get_u32_le()?;
7945        let tmp = buf.get_u8()?;
7946        __struct.mode_id =
7947            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7948                enum_type: "CameraMode",
7949                value: tmp as u64,
7950            })?;
7951        __struct.zoomLevel = buf.get_f32_le()?;
7952        __struct.focusLevel = buf.get_f32_le()?;
7953        __struct.camera_device_id = buf.get_u8()?;
7954        Ok(__struct)
7955    }
7956    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7957        let mut __tmp = BytesMut::new(bytes);
7958        #[allow(clippy::absurd_extreme_comparisons)]
7959        #[allow(unused_comparisons)]
7960        if __tmp.remaining() < Self::ENCODED_LEN {
7961            panic!(
7962                "buffer is too small (need {} bytes, but got {})",
7963                Self::ENCODED_LEN,
7964                __tmp.remaining(),
7965            )
7966        }
7967        __tmp.put_u32_le(self.time_boot_ms);
7968        __tmp.put_u8(self.mode_id as u8);
7969        if matches!(version, MavlinkVersion::V2) {
7970            __tmp.put_f32_le(self.zoomLevel);
7971            __tmp.put_f32_le(self.focusLevel);
7972            __tmp.put_u8(self.camera_device_id);
7973            let len = __tmp.len();
7974            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7975        } else {
7976            __tmp.len()
7977        }
7978    }
7979}
7980#[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
7981#[doc = ""]
7982#[doc = "ID: 277"]
7983#[derive(Debug, Clone, PartialEq)]
7984#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7985#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7986#[cfg_attr(feature = "ts", derive(TS))]
7987#[cfg_attr(feature = "ts", ts(export))]
7988pub struct CAMERA_THERMAL_RANGE_DATA {
7989    #[doc = "Timestamp (time since system boot)."]
7990    pub time_boot_ms: u32,
7991    #[doc = "Temperature max."]
7992    pub max: f32,
7993    #[doc = "Temperature max point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
7994    pub max_point_x: f32,
7995    #[doc = "Temperature max point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
7996    pub max_point_y: f32,
7997    #[doc = "Temperature min."]
7998    pub min: f32,
7999    #[doc = "Temperature min point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
8000    pub min_point_x: f32,
8001    #[doc = "Temperature min point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
8002    pub min_point_y: f32,
8003    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
8004    pub stream_id: u8,
8005    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
8006    pub camera_device_id: u8,
8007}
8008impl CAMERA_THERMAL_RANGE_DATA {
8009    pub const ENCODED_LEN: usize = 30usize;
8010    pub const DEFAULT: Self = Self {
8011        time_boot_ms: 0_u32,
8012        max: 0.0_f32,
8013        max_point_x: 0.0_f32,
8014        max_point_y: 0.0_f32,
8015        min: 0.0_f32,
8016        min_point_x: 0.0_f32,
8017        min_point_y: 0.0_f32,
8018        stream_id: 0_u8,
8019        camera_device_id: 0_u8,
8020    };
8021    #[cfg(feature = "arbitrary")]
8022    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8023        use arbitrary::{Arbitrary, Unstructured};
8024        let mut buf = [0u8; 1024];
8025        rng.fill_bytes(&mut buf);
8026        let mut unstructured = Unstructured::new(&buf);
8027        Self::arbitrary(&mut unstructured).unwrap_or_default()
8028    }
8029}
8030impl Default for CAMERA_THERMAL_RANGE_DATA {
8031    fn default() -> Self {
8032        Self::DEFAULT.clone()
8033    }
8034}
8035impl MessageData for CAMERA_THERMAL_RANGE_DATA {
8036    type Message = MavMessage;
8037    const ID: u32 = 277u32;
8038    const NAME: &'static str = "CAMERA_THERMAL_RANGE";
8039    const EXTRA_CRC: u8 = 62u8;
8040    const ENCODED_LEN: usize = 30usize;
8041    fn deser(
8042        _version: MavlinkVersion,
8043        __input: &[u8],
8044    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8045        let avail_len = __input.len();
8046        let mut payload_buf = [0; Self::ENCODED_LEN];
8047        let mut buf = if avail_len < Self::ENCODED_LEN {
8048            payload_buf[0..avail_len].copy_from_slice(__input);
8049            Bytes::new(&payload_buf)
8050        } else {
8051            Bytes::new(__input)
8052        };
8053        let mut __struct = Self::default();
8054        __struct.time_boot_ms = buf.get_u32_le()?;
8055        __struct.max = buf.get_f32_le()?;
8056        __struct.max_point_x = buf.get_f32_le()?;
8057        __struct.max_point_y = buf.get_f32_le()?;
8058        __struct.min = buf.get_f32_le()?;
8059        __struct.min_point_x = buf.get_f32_le()?;
8060        __struct.min_point_y = buf.get_f32_le()?;
8061        __struct.stream_id = buf.get_u8()?;
8062        __struct.camera_device_id = buf.get_u8()?;
8063        Ok(__struct)
8064    }
8065    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8066        let mut __tmp = BytesMut::new(bytes);
8067        #[allow(clippy::absurd_extreme_comparisons)]
8068        #[allow(unused_comparisons)]
8069        if __tmp.remaining() < Self::ENCODED_LEN {
8070            panic!(
8071                "buffer is too small (need {} bytes, but got {})",
8072                Self::ENCODED_LEN,
8073                __tmp.remaining(),
8074            )
8075        }
8076        __tmp.put_u32_le(self.time_boot_ms);
8077        __tmp.put_f32_le(self.max);
8078        __tmp.put_f32_le(self.max_point_x);
8079        __tmp.put_f32_le(self.max_point_y);
8080        __tmp.put_f32_le(self.min);
8081        __tmp.put_f32_le(self.min_point_x);
8082        __tmp.put_f32_le(self.min_point_y);
8083        __tmp.put_u8(self.stream_id);
8084        __tmp.put_u8(self.camera_device_id);
8085        if matches!(version, MavlinkVersion::V2) {
8086            let len = __tmp.len();
8087            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8088        } else {
8089            __tmp.len()
8090        }
8091    }
8092}
8093#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
8094#[doc = ""]
8095#[doc = "ID: 276"]
8096#[derive(Debug, Clone, PartialEq)]
8097#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8098#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8099#[cfg_attr(feature = "ts", derive(TS))]
8100#[cfg_attr(feature = "ts", ts(export))]
8101pub struct CAMERA_TRACKING_GEO_STATUS_DATA {
8102    #[doc = "Latitude of tracked object"]
8103    pub lat: i32,
8104    #[doc = "Longitude of tracked object"]
8105    pub lon: i32,
8106    #[doc = "Altitude of tracked object(AMSL, WGS84)"]
8107    pub alt: f32,
8108    #[doc = "Horizontal accuracy. NAN if unknown"]
8109    pub h_acc: f32,
8110    #[doc = "Vertical accuracy. NAN if unknown"]
8111    pub v_acc: f32,
8112    #[doc = "North velocity of tracked object. NAN if unknown"]
8113    pub vel_n: f32,
8114    #[doc = "East velocity of tracked object. NAN if unknown"]
8115    pub vel_e: f32,
8116    #[doc = "Down velocity of tracked object. NAN if unknown"]
8117    pub vel_d: f32,
8118    #[doc = "Velocity accuracy. NAN if unknown"]
8119    pub vel_acc: f32,
8120    #[doc = "Distance between camera and tracked object. NAN if unknown"]
8121    pub dist: f32,
8122    #[doc = "Heading in radians, in NED. NAN if unknown"]
8123    pub hdg: f32,
8124    #[doc = "Accuracy of heading, in NED. NAN if unknown"]
8125    pub hdg_acc: f32,
8126    #[doc = "Current tracking status"]
8127    pub tracking_status: CameraTrackingStatusFlags,
8128    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
8129    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8130    pub camera_device_id: u8,
8131}
8132impl CAMERA_TRACKING_GEO_STATUS_DATA {
8133    pub const ENCODED_LEN: usize = 50usize;
8134    pub const DEFAULT: Self = Self {
8135        lat: 0_i32,
8136        lon: 0_i32,
8137        alt: 0.0_f32,
8138        h_acc: 0.0_f32,
8139        v_acc: 0.0_f32,
8140        vel_n: 0.0_f32,
8141        vel_e: 0.0_f32,
8142        vel_d: 0.0_f32,
8143        vel_acc: 0.0_f32,
8144        dist: 0.0_f32,
8145        hdg: 0.0_f32,
8146        hdg_acc: 0.0_f32,
8147        tracking_status: CameraTrackingStatusFlags::DEFAULT,
8148        camera_device_id: 0_u8,
8149    };
8150    #[cfg(feature = "arbitrary")]
8151    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8152        use arbitrary::{Arbitrary, Unstructured};
8153        let mut buf = [0u8; 1024];
8154        rng.fill_bytes(&mut buf);
8155        let mut unstructured = Unstructured::new(&buf);
8156        Self::arbitrary(&mut unstructured).unwrap_or_default()
8157    }
8158}
8159impl Default for CAMERA_TRACKING_GEO_STATUS_DATA {
8160    fn default() -> Self {
8161        Self::DEFAULT.clone()
8162    }
8163}
8164impl MessageData for CAMERA_TRACKING_GEO_STATUS_DATA {
8165    type Message = MavMessage;
8166    const ID: u32 = 276u32;
8167    const NAME: &'static str = "CAMERA_TRACKING_GEO_STATUS";
8168    const EXTRA_CRC: u8 = 18u8;
8169    const ENCODED_LEN: usize = 50usize;
8170    fn deser(
8171        _version: MavlinkVersion,
8172        __input: &[u8],
8173    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8174        let avail_len = __input.len();
8175        let mut payload_buf = [0; Self::ENCODED_LEN];
8176        let mut buf = if avail_len < Self::ENCODED_LEN {
8177            payload_buf[0..avail_len].copy_from_slice(__input);
8178            Bytes::new(&payload_buf)
8179        } else {
8180            Bytes::new(__input)
8181        };
8182        let mut __struct = Self::default();
8183        __struct.lat = buf.get_i32_le()?;
8184        __struct.lon = buf.get_i32_le()?;
8185        __struct.alt = buf.get_f32_le()?;
8186        __struct.h_acc = buf.get_f32_le()?;
8187        __struct.v_acc = buf.get_f32_le()?;
8188        __struct.vel_n = buf.get_f32_le()?;
8189        __struct.vel_e = buf.get_f32_le()?;
8190        __struct.vel_d = buf.get_f32_le()?;
8191        __struct.vel_acc = buf.get_f32_le()?;
8192        __struct.dist = buf.get_f32_le()?;
8193        __struct.hdg = buf.get_f32_le()?;
8194        __struct.hdg_acc = buf.get_f32_le()?;
8195        let tmp = buf.get_u8()?;
8196        __struct.tracking_status =
8197            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8198                enum_type: "CameraTrackingStatusFlags",
8199                value: tmp as u64,
8200            })?;
8201        __struct.camera_device_id = buf.get_u8()?;
8202        Ok(__struct)
8203    }
8204    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8205        let mut __tmp = BytesMut::new(bytes);
8206        #[allow(clippy::absurd_extreme_comparisons)]
8207        #[allow(unused_comparisons)]
8208        if __tmp.remaining() < Self::ENCODED_LEN {
8209            panic!(
8210                "buffer is too small (need {} bytes, but got {})",
8211                Self::ENCODED_LEN,
8212                __tmp.remaining(),
8213            )
8214        }
8215        __tmp.put_i32_le(self.lat);
8216        __tmp.put_i32_le(self.lon);
8217        __tmp.put_f32_le(self.alt);
8218        __tmp.put_f32_le(self.h_acc);
8219        __tmp.put_f32_le(self.v_acc);
8220        __tmp.put_f32_le(self.vel_n);
8221        __tmp.put_f32_le(self.vel_e);
8222        __tmp.put_f32_le(self.vel_d);
8223        __tmp.put_f32_le(self.vel_acc);
8224        __tmp.put_f32_le(self.dist);
8225        __tmp.put_f32_le(self.hdg);
8226        __tmp.put_f32_le(self.hdg_acc);
8227        __tmp.put_u8(self.tracking_status as u8);
8228        if matches!(version, MavlinkVersion::V2) {
8229            __tmp.put_u8(self.camera_device_id);
8230            let len = __tmp.len();
8231            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8232        } else {
8233            __tmp.len()
8234        }
8235    }
8236}
8237#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
8238#[doc = ""]
8239#[doc = "ID: 275"]
8240#[derive(Debug, Clone, PartialEq)]
8241#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8242#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8243#[cfg_attr(feature = "ts", derive(TS))]
8244#[cfg_attr(feature = "ts", ts(export))]
8245pub struct CAMERA_TRACKING_IMAGE_STATUS_DATA {
8246    #[doc = "Current tracked point x value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
8247    pub point_x: f32,
8248    #[doc = "Current tracked point y value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
8249    pub point_y: f32,
8250    #[doc = "Current tracked radius if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is image left, 1 is image right), NAN if unknown"]
8251    pub radius: f32,
8252    #[doc = "Current tracked rectangle top x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
8253    pub rec_top_x: f32,
8254    #[doc = "Current tracked rectangle top y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
8255    pub rec_top_y: f32,
8256    #[doc = "Current tracked rectangle bottom x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
8257    pub rec_bottom_x: f32,
8258    #[doc = "Current tracked rectangle bottom y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
8259    pub rec_bottom_y: f32,
8260    #[doc = "Current tracking status"]
8261    pub tracking_status: CameraTrackingStatusFlags,
8262    #[doc = "Current tracking mode"]
8263    pub tracking_mode: CameraTrackingMode,
8264    #[doc = "Defines location of target data"]
8265    pub target_data: CameraTrackingTargetData,
8266    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
8267    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8268    pub camera_device_id: u8,
8269}
8270impl CAMERA_TRACKING_IMAGE_STATUS_DATA {
8271    pub const ENCODED_LEN: usize = 32usize;
8272    pub const DEFAULT: Self = Self {
8273        point_x: 0.0_f32,
8274        point_y: 0.0_f32,
8275        radius: 0.0_f32,
8276        rec_top_x: 0.0_f32,
8277        rec_top_y: 0.0_f32,
8278        rec_bottom_x: 0.0_f32,
8279        rec_bottom_y: 0.0_f32,
8280        tracking_status: CameraTrackingStatusFlags::DEFAULT,
8281        tracking_mode: CameraTrackingMode::DEFAULT,
8282        target_data: CameraTrackingTargetData::DEFAULT,
8283        camera_device_id: 0_u8,
8284    };
8285    #[cfg(feature = "arbitrary")]
8286    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8287        use arbitrary::{Arbitrary, Unstructured};
8288        let mut buf = [0u8; 1024];
8289        rng.fill_bytes(&mut buf);
8290        let mut unstructured = Unstructured::new(&buf);
8291        Self::arbitrary(&mut unstructured).unwrap_or_default()
8292    }
8293}
8294impl Default for CAMERA_TRACKING_IMAGE_STATUS_DATA {
8295    fn default() -> Self {
8296        Self::DEFAULT.clone()
8297    }
8298}
8299impl MessageData for CAMERA_TRACKING_IMAGE_STATUS_DATA {
8300    type Message = MavMessage;
8301    const ID: u32 = 275u32;
8302    const NAME: &'static str = "CAMERA_TRACKING_IMAGE_STATUS";
8303    const EXTRA_CRC: u8 = 126u8;
8304    const ENCODED_LEN: usize = 32usize;
8305    fn deser(
8306        _version: MavlinkVersion,
8307        __input: &[u8],
8308    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8309        let avail_len = __input.len();
8310        let mut payload_buf = [0; Self::ENCODED_LEN];
8311        let mut buf = if avail_len < Self::ENCODED_LEN {
8312            payload_buf[0..avail_len].copy_from_slice(__input);
8313            Bytes::new(&payload_buf)
8314        } else {
8315            Bytes::new(__input)
8316        };
8317        let mut __struct = Self::default();
8318        __struct.point_x = buf.get_f32_le()?;
8319        __struct.point_y = buf.get_f32_le()?;
8320        __struct.radius = buf.get_f32_le()?;
8321        __struct.rec_top_x = buf.get_f32_le()?;
8322        __struct.rec_top_y = buf.get_f32_le()?;
8323        __struct.rec_bottom_x = buf.get_f32_le()?;
8324        __struct.rec_bottom_y = buf.get_f32_le()?;
8325        let tmp = buf.get_u8()?;
8326        __struct.tracking_status =
8327            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8328                enum_type: "CameraTrackingStatusFlags",
8329                value: tmp as u64,
8330            })?;
8331        let tmp = buf.get_u8()?;
8332        __struct.tracking_mode =
8333            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8334                enum_type: "CameraTrackingMode",
8335                value: tmp as u64,
8336            })?;
8337        let tmp = buf.get_u8()?;
8338        __struct.target_data =
8339            CameraTrackingTargetData::from_bits(tmp as <CameraTrackingTargetData as Flags>::Bits)
8340                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
8341                flag_type: "CameraTrackingTargetData",
8342                value: tmp as u64,
8343            })?;
8344        __struct.camera_device_id = buf.get_u8()?;
8345        Ok(__struct)
8346    }
8347    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8348        let mut __tmp = BytesMut::new(bytes);
8349        #[allow(clippy::absurd_extreme_comparisons)]
8350        #[allow(unused_comparisons)]
8351        if __tmp.remaining() < Self::ENCODED_LEN {
8352            panic!(
8353                "buffer is too small (need {} bytes, but got {})",
8354                Self::ENCODED_LEN,
8355                __tmp.remaining(),
8356            )
8357        }
8358        __tmp.put_f32_le(self.point_x);
8359        __tmp.put_f32_le(self.point_y);
8360        __tmp.put_f32_le(self.radius);
8361        __tmp.put_f32_le(self.rec_top_x);
8362        __tmp.put_f32_le(self.rec_top_y);
8363        __tmp.put_f32_le(self.rec_bottom_x);
8364        __tmp.put_f32_le(self.rec_bottom_y);
8365        __tmp.put_u8(self.tracking_status as u8);
8366        __tmp.put_u8(self.tracking_mode as u8);
8367        __tmp.put_u8(self.target_data.bits() as u8);
8368        if matches!(version, MavlinkVersion::V2) {
8369            __tmp.put_u8(self.camera_device_id);
8370            let len = __tmp.len();
8371            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8372        } else {
8373            __tmp.len()
8374        }
8375    }
8376}
8377#[doc = "Camera-IMU triggering and synchronisation message."]
8378#[doc = ""]
8379#[doc = "ID: 112"]
8380#[derive(Debug, Clone, PartialEq)]
8381#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8382#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8383#[cfg_attr(feature = "ts", derive(TS))]
8384#[cfg_attr(feature = "ts", ts(export))]
8385pub struct CAMERA_TRIGGER_DATA {
8386    #[doc = "Timestamp for image frame (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
8387    pub time_usec: u64,
8388    #[doc = "Image frame sequence"]
8389    pub seq: u32,
8390}
8391impl CAMERA_TRIGGER_DATA {
8392    pub const ENCODED_LEN: usize = 12usize;
8393    pub const DEFAULT: Self = Self {
8394        time_usec: 0_u64,
8395        seq: 0_u32,
8396    };
8397    #[cfg(feature = "arbitrary")]
8398    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8399        use arbitrary::{Arbitrary, Unstructured};
8400        let mut buf = [0u8; 1024];
8401        rng.fill_bytes(&mut buf);
8402        let mut unstructured = Unstructured::new(&buf);
8403        Self::arbitrary(&mut unstructured).unwrap_or_default()
8404    }
8405}
8406impl Default for CAMERA_TRIGGER_DATA {
8407    fn default() -> Self {
8408        Self::DEFAULT.clone()
8409    }
8410}
8411impl MessageData for CAMERA_TRIGGER_DATA {
8412    type Message = MavMessage;
8413    const ID: u32 = 112u32;
8414    const NAME: &'static str = "CAMERA_TRIGGER";
8415    const EXTRA_CRC: u8 = 174u8;
8416    const ENCODED_LEN: usize = 12usize;
8417    fn deser(
8418        _version: MavlinkVersion,
8419        __input: &[u8],
8420    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8421        let avail_len = __input.len();
8422        let mut payload_buf = [0; Self::ENCODED_LEN];
8423        let mut buf = if avail_len < Self::ENCODED_LEN {
8424            payload_buf[0..avail_len].copy_from_slice(__input);
8425            Bytes::new(&payload_buf)
8426        } else {
8427            Bytes::new(__input)
8428        };
8429        let mut __struct = Self::default();
8430        __struct.time_usec = buf.get_u64_le()?;
8431        __struct.seq = buf.get_u32_le()?;
8432        Ok(__struct)
8433    }
8434    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8435        let mut __tmp = BytesMut::new(bytes);
8436        #[allow(clippy::absurd_extreme_comparisons)]
8437        #[allow(unused_comparisons)]
8438        if __tmp.remaining() < Self::ENCODED_LEN {
8439            panic!(
8440                "buffer is too small (need {} bytes, but got {})",
8441                Self::ENCODED_LEN,
8442                __tmp.remaining(),
8443            )
8444        }
8445        __tmp.put_u64_le(self.time_usec);
8446        __tmp.put_u32_le(self.seq);
8447        if matches!(version, MavlinkVersion::V2) {
8448            let len = __tmp.len();
8449            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8450        } else {
8451            __tmp.len()
8452        }
8453    }
8454}
8455#[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
8456#[doc = ""]
8457#[doc = "ID: 387"]
8458#[derive(Debug, Clone, PartialEq)]
8459#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8460#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8461#[cfg_attr(feature = "ts", derive(TS))]
8462#[cfg_attr(feature = "ts", ts(export))]
8463pub struct CANFD_FRAME_DATA {
8464    #[doc = "Frame ID"]
8465    pub id: u32,
8466    #[doc = "System ID."]
8467    pub target_system: u8,
8468    #[doc = "Component ID."]
8469    pub target_component: u8,
8470    #[doc = "bus number"]
8471    pub bus: u8,
8472    #[doc = "Frame length"]
8473    pub len: u8,
8474    #[doc = "Frame data"]
8475    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8476    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8477    pub data: [u8; 64],
8478}
8479impl CANFD_FRAME_DATA {
8480    pub const ENCODED_LEN: usize = 72usize;
8481    pub const DEFAULT: Self = Self {
8482        id: 0_u32,
8483        target_system: 0_u8,
8484        target_component: 0_u8,
8485        bus: 0_u8,
8486        len: 0_u8,
8487        data: [0_u8; 64usize],
8488    };
8489    #[cfg(feature = "arbitrary")]
8490    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8491        use arbitrary::{Arbitrary, Unstructured};
8492        let mut buf = [0u8; 1024];
8493        rng.fill_bytes(&mut buf);
8494        let mut unstructured = Unstructured::new(&buf);
8495        Self::arbitrary(&mut unstructured).unwrap_or_default()
8496    }
8497}
8498impl Default for CANFD_FRAME_DATA {
8499    fn default() -> Self {
8500        Self::DEFAULT.clone()
8501    }
8502}
8503impl MessageData for CANFD_FRAME_DATA {
8504    type Message = MavMessage;
8505    const ID: u32 = 387u32;
8506    const NAME: &'static str = "CANFD_FRAME";
8507    const EXTRA_CRC: u8 = 4u8;
8508    const ENCODED_LEN: usize = 72usize;
8509    fn deser(
8510        _version: MavlinkVersion,
8511        __input: &[u8],
8512    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8513        let avail_len = __input.len();
8514        let mut payload_buf = [0; Self::ENCODED_LEN];
8515        let mut buf = if avail_len < Self::ENCODED_LEN {
8516            payload_buf[0..avail_len].copy_from_slice(__input);
8517            Bytes::new(&payload_buf)
8518        } else {
8519            Bytes::new(__input)
8520        };
8521        let mut __struct = Self::default();
8522        __struct.id = buf.get_u32_le()?;
8523        __struct.target_system = buf.get_u8()?;
8524        __struct.target_component = buf.get_u8()?;
8525        __struct.bus = buf.get_u8()?;
8526        __struct.len = buf.get_u8()?;
8527        for v in &mut __struct.data {
8528            let val = buf.get_u8()?;
8529            *v = val;
8530        }
8531        Ok(__struct)
8532    }
8533    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8534        let mut __tmp = BytesMut::new(bytes);
8535        #[allow(clippy::absurd_extreme_comparisons)]
8536        #[allow(unused_comparisons)]
8537        if __tmp.remaining() < Self::ENCODED_LEN {
8538            panic!(
8539                "buffer is too small (need {} bytes, but got {})",
8540                Self::ENCODED_LEN,
8541                __tmp.remaining(),
8542            )
8543        }
8544        __tmp.put_u32_le(self.id);
8545        __tmp.put_u8(self.target_system);
8546        __tmp.put_u8(self.target_component);
8547        __tmp.put_u8(self.bus);
8548        __tmp.put_u8(self.len);
8549        for val in &self.data {
8550            __tmp.put_u8(*val);
8551        }
8552        if matches!(version, MavlinkVersion::V2) {
8553            let len = __tmp.len();
8554            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8555        } else {
8556            __tmp.len()
8557        }
8558    }
8559}
8560#[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
8561#[doc = ""]
8562#[doc = "ID: 388"]
8563#[derive(Debug, Clone, PartialEq)]
8564#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8565#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8566#[cfg_attr(feature = "ts", derive(TS))]
8567#[cfg_attr(feature = "ts", ts(export))]
8568pub struct CAN_FILTER_MODIFY_DATA {
8569    #[doc = "filter IDs, length num_ids"]
8570    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8571    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8572    pub ids: [u16; 16],
8573    #[doc = "System ID."]
8574    pub target_system: u8,
8575    #[doc = "Component ID."]
8576    pub target_component: u8,
8577    #[doc = "bus number"]
8578    pub bus: u8,
8579    #[doc = "what operation to perform on the filter list. See CAN_FILTER_OP enum."]
8580    pub operation: CanFilterOp,
8581    #[doc = "number of IDs in filter list"]
8582    pub num_ids: u8,
8583}
8584impl CAN_FILTER_MODIFY_DATA {
8585    pub const ENCODED_LEN: usize = 37usize;
8586    pub const DEFAULT: Self = Self {
8587        ids: [0_u16; 16usize],
8588        target_system: 0_u8,
8589        target_component: 0_u8,
8590        bus: 0_u8,
8591        operation: CanFilterOp::DEFAULT,
8592        num_ids: 0_u8,
8593    };
8594    #[cfg(feature = "arbitrary")]
8595    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8596        use arbitrary::{Arbitrary, Unstructured};
8597        let mut buf = [0u8; 1024];
8598        rng.fill_bytes(&mut buf);
8599        let mut unstructured = Unstructured::new(&buf);
8600        Self::arbitrary(&mut unstructured).unwrap_or_default()
8601    }
8602}
8603impl Default for CAN_FILTER_MODIFY_DATA {
8604    fn default() -> Self {
8605        Self::DEFAULT.clone()
8606    }
8607}
8608impl MessageData for CAN_FILTER_MODIFY_DATA {
8609    type Message = MavMessage;
8610    const ID: u32 = 388u32;
8611    const NAME: &'static str = "CAN_FILTER_MODIFY";
8612    const EXTRA_CRC: u8 = 8u8;
8613    const ENCODED_LEN: usize = 37usize;
8614    fn deser(
8615        _version: MavlinkVersion,
8616        __input: &[u8],
8617    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8618        let avail_len = __input.len();
8619        let mut payload_buf = [0; Self::ENCODED_LEN];
8620        let mut buf = if avail_len < Self::ENCODED_LEN {
8621            payload_buf[0..avail_len].copy_from_slice(__input);
8622            Bytes::new(&payload_buf)
8623        } else {
8624            Bytes::new(__input)
8625        };
8626        let mut __struct = Self::default();
8627        for v in &mut __struct.ids {
8628            let val = buf.get_u16_le()?;
8629            *v = val;
8630        }
8631        __struct.target_system = buf.get_u8()?;
8632        __struct.target_component = buf.get_u8()?;
8633        __struct.bus = buf.get_u8()?;
8634        let tmp = buf.get_u8()?;
8635        __struct.operation =
8636            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8637                enum_type: "CanFilterOp",
8638                value: tmp as u64,
8639            })?;
8640        __struct.num_ids = buf.get_u8()?;
8641        Ok(__struct)
8642    }
8643    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8644        let mut __tmp = BytesMut::new(bytes);
8645        #[allow(clippy::absurd_extreme_comparisons)]
8646        #[allow(unused_comparisons)]
8647        if __tmp.remaining() < Self::ENCODED_LEN {
8648            panic!(
8649                "buffer is too small (need {} bytes, but got {})",
8650                Self::ENCODED_LEN,
8651                __tmp.remaining(),
8652            )
8653        }
8654        for val in &self.ids {
8655            __tmp.put_u16_le(*val);
8656        }
8657        __tmp.put_u8(self.target_system);
8658        __tmp.put_u8(self.target_component);
8659        __tmp.put_u8(self.bus);
8660        __tmp.put_u8(self.operation as u8);
8661        __tmp.put_u8(self.num_ids);
8662        if matches!(version, MavlinkVersion::V2) {
8663            let len = __tmp.len();
8664            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8665        } else {
8666            __tmp.len()
8667        }
8668    }
8669}
8670#[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
8671#[doc = ""]
8672#[doc = "ID: 386"]
8673#[derive(Debug, Clone, PartialEq)]
8674#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8675#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8676#[cfg_attr(feature = "ts", derive(TS))]
8677#[cfg_attr(feature = "ts", ts(export))]
8678pub struct CAN_FRAME_DATA {
8679    #[doc = "Frame ID"]
8680    pub id: u32,
8681    #[doc = "System ID."]
8682    pub target_system: u8,
8683    #[doc = "Component ID."]
8684    pub target_component: u8,
8685    #[doc = "Bus number"]
8686    pub bus: u8,
8687    #[doc = "Frame length"]
8688    pub len: u8,
8689    #[doc = "Frame data"]
8690    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8691    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
8692    pub data: [u8; 8],
8693}
8694impl CAN_FRAME_DATA {
8695    pub const ENCODED_LEN: usize = 16usize;
8696    pub const DEFAULT: Self = Self {
8697        id: 0_u32,
8698        target_system: 0_u8,
8699        target_component: 0_u8,
8700        bus: 0_u8,
8701        len: 0_u8,
8702        data: [0_u8; 8usize],
8703    };
8704    #[cfg(feature = "arbitrary")]
8705    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8706        use arbitrary::{Arbitrary, Unstructured};
8707        let mut buf = [0u8; 1024];
8708        rng.fill_bytes(&mut buf);
8709        let mut unstructured = Unstructured::new(&buf);
8710        Self::arbitrary(&mut unstructured).unwrap_or_default()
8711    }
8712}
8713impl Default for CAN_FRAME_DATA {
8714    fn default() -> Self {
8715        Self::DEFAULT.clone()
8716    }
8717}
8718impl MessageData for CAN_FRAME_DATA {
8719    type Message = MavMessage;
8720    const ID: u32 = 386u32;
8721    const NAME: &'static str = "CAN_FRAME";
8722    const EXTRA_CRC: u8 = 132u8;
8723    const ENCODED_LEN: usize = 16usize;
8724    fn deser(
8725        _version: MavlinkVersion,
8726        __input: &[u8],
8727    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8728        let avail_len = __input.len();
8729        let mut payload_buf = [0; Self::ENCODED_LEN];
8730        let mut buf = if avail_len < Self::ENCODED_LEN {
8731            payload_buf[0..avail_len].copy_from_slice(__input);
8732            Bytes::new(&payload_buf)
8733        } else {
8734            Bytes::new(__input)
8735        };
8736        let mut __struct = Self::default();
8737        __struct.id = buf.get_u32_le()?;
8738        __struct.target_system = buf.get_u8()?;
8739        __struct.target_component = buf.get_u8()?;
8740        __struct.bus = buf.get_u8()?;
8741        __struct.len = buf.get_u8()?;
8742        for v in &mut __struct.data {
8743            let val = buf.get_u8()?;
8744            *v = val;
8745        }
8746        Ok(__struct)
8747    }
8748    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8749        let mut __tmp = BytesMut::new(bytes);
8750        #[allow(clippy::absurd_extreme_comparisons)]
8751        #[allow(unused_comparisons)]
8752        if __tmp.remaining() < Self::ENCODED_LEN {
8753            panic!(
8754                "buffer is too small (need {} bytes, but got {})",
8755                Self::ENCODED_LEN,
8756                __tmp.remaining(),
8757            )
8758        }
8759        __tmp.put_u32_le(self.id);
8760        __tmp.put_u8(self.target_system);
8761        __tmp.put_u8(self.target_component);
8762        __tmp.put_u8(self.bus);
8763        __tmp.put_u8(self.len);
8764        for val in &self.data {
8765            __tmp.put_u8(*val);
8766        }
8767        if matches!(version, MavlinkVersion::V2) {
8768            let len = __tmp.len();
8769            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8770        } else {
8771            __tmp.len()
8772        }
8773    }
8774}
8775#[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
8776#[doc = ""]
8777#[doc = "ID: 336"]
8778#[derive(Debug, Clone, PartialEq)]
8779#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8780#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8781#[cfg_attr(feature = "ts", derive(TS))]
8782#[cfg_attr(feature = "ts", ts(export))]
8783pub struct CELLULAR_CONFIG_DATA {
8784    #[doc = "Enable/disable LTE. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8785    pub enable_lte: u8,
8786    #[doc = "Enable/disable PIN on the SIM card. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8787    pub enable_pin: u8,
8788    #[doc = "PIN sent to the SIM card. Blank when PIN is disabled. Empty when message is sent back as a response."]
8789    #[cfg_attr(feature = "ts", ts(type = "string"))]
8790    pub pin: CharArray<16>,
8791    #[doc = "New PIN when changing the PIN. Blank to leave it unchanged. Empty when message is sent back as a response."]
8792    #[cfg_attr(feature = "ts", ts(type = "string"))]
8793    pub new_pin: CharArray<16>,
8794    #[doc = "Name of the cellular APN. Blank to leave it unchanged. Current APN when sent back as a response."]
8795    #[cfg_attr(feature = "ts", ts(type = "string"))]
8796    pub apn: CharArray<32>,
8797    #[doc = "Required PUK code in case the user failed to authenticate 3 times with the PIN. Empty when message is sent back as a response."]
8798    #[cfg_attr(feature = "ts", ts(type = "string"))]
8799    pub puk: CharArray<16>,
8800    #[doc = "Enable/disable roaming. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8801    pub roaming: u8,
8802    #[doc = "Message acceptance response (sent back to GS)."]
8803    pub response: CellularConfigResponse,
8804}
8805impl CELLULAR_CONFIG_DATA {
8806    pub const ENCODED_LEN: usize = 84usize;
8807    pub const DEFAULT: Self = Self {
8808        enable_lte: 0_u8,
8809        enable_pin: 0_u8,
8810        pin: CharArray::new([0_u8; 16usize]),
8811        new_pin: CharArray::new([0_u8; 16usize]),
8812        apn: CharArray::new([0_u8; 32usize]),
8813        puk: CharArray::new([0_u8; 16usize]),
8814        roaming: 0_u8,
8815        response: CellularConfigResponse::DEFAULT,
8816    };
8817    #[cfg(feature = "arbitrary")]
8818    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8819        use arbitrary::{Arbitrary, Unstructured};
8820        let mut buf = [0u8; 1024];
8821        rng.fill_bytes(&mut buf);
8822        let mut unstructured = Unstructured::new(&buf);
8823        Self::arbitrary(&mut unstructured).unwrap_or_default()
8824    }
8825}
8826impl Default for CELLULAR_CONFIG_DATA {
8827    fn default() -> Self {
8828        Self::DEFAULT.clone()
8829    }
8830}
8831impl MessageData for CELLULAR_CONFIG_DATA {
8832    type Message = MavMessage;
8833    const ID: u32 = 336u32;
8834    const NAME: &'static str = "CELLULAR_CONFIG";
8835    const EXTRA_CRC: u8 = 245u8;
8836    const ENCODED_LEN: usize = 84usize;
8837    fn deser(
8838        _version: MavlinkVersion,
8839        __input: &[u8],
8840    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8841        let avail_len = __input.len();
8842        let mut payload_buf = [0; Self::ENCODED_LEN];
8843        let mut buf = if avail_len < Self::ENCODED_LEN {
8844            payload_buf[0..avail_len].copy_from_slice(__input);
8845            Bytes::new(&payload_buf)
8846        } else {
8847            Bytes::new(__input)
8848        };
8849        let mut __struct = Self::default();
8850        __struct.enable_lte = buf.get_u8()?;
8851        __struct.enable_pin = buf.get_u8()?;
8852        let mut tmp = [0_u8; 16usize];
8853        for v in &mut tmp {
8854            *v = buf.get_u8()?;
8855        }
8856        __struct.pin = CharArray::new(tmp);
8857        let mut tmp = [0_u8; 16usize];
8858        for v in &mut tmp {
8859            *v = buf.get_u8()?;
8860        }
8861        __struct.new_pin = CharArray::new(tmp);
8862        let mut tmp = [0_u8; 32usize];
8863        for v in &mut tmp {
8864            *v = buf.get_u8()?;
8865        }
8866        __struct.apn = CharArray::new(tmp);
8867        let mut tmp = [0_u8; 16usize];
8868        for v in &mut tmp {
8869            *v = buf.get_u8()?;
8870        }
8871        __struct.puk = CharArray::new(tmp);
8872        __struct.roaming = buf.get_u8()?;
8873        let tmp = buf.get_u8()?;
8874        __struct.response =
8875            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8876                enum_type: "CellularConfigResponse",
8877                value: tmp as u64,
8878            })?;
8879        Ok(__struct)
8880    }
8881    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8882        let mut __tmp = BytesMut::new(bytes);
8883        #[allow(clippy::absurd_extreme_comparisons)]
8884        #[allow(unused_comparisons)]
8885        if __tmp.remaining() < Self::ENCODED_LEN {
8886            panic!(
8887                "buffer is too small (need {} bytes, but got {})",
8888                Self::ENCODED_LEN,
8889                __tmp.remaining(),
8890            )
8891        }
8892        __tmp.put_u8(self.enable_lte);
8893        __tmp.put_u8(self.enable_pin);
8894        for val in &self.pin {
8895            __tmp.put_u8(*val);
8896        }
8897        for val in &self.new_pin {
8898            __tmp.put_u8(*val);
8899        }
8900        for val in &self.apn {
8901            __tmp.put_u8(*val);
8902        }
8903        for val in &self.puk {
8904            __tmp.put_u8(*val);
8905        }
8906        __tmp.put_u8(self.roaming);
8907        __tmp.put_u8(self.response as u8);
8908        if matches!(version, MavlinkVersion::V2) {
8909            let len = __tmp.len();
8910            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8911        } else {
8912            __tmp.len()
8913        }
8914    }
8915}
8916#[doc = "Report current used cellular network status."]
8917#[doc = ""]
8918#[doc = "ID: 334"]
8919#[derive(Debug, Clone, PartialEq)]
8920#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8921#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8922#[cfg_attr(feature = "ts", derive(TS))]
8923#[cfg_attr(feature = "ts", ts(export))]
8924pub struct CELLULAR_STATUS_DATA {
8925    #[doc = "Mobile country code. If unknown, set to UINT16_MAX"]
8926    pub mcc: u16,
8927    #[doc = "Mobile network code. If unknown, set to UINT16_MAX"]
8928    pub mnc: u16,
8929    #[doc = "Location area code. If unknown, set to 0"]
8930    pub lac: u16,
8931    #[doc = "Cellular modem status"]
8932    pub status: CellularStatusFlag,
8933    #[doc = "Failure reason when status in in CELLULAR_STATUS_FLAG_FAILED"]
8934    pub failure_reason: CellularNetworkFailedReason,
8935    #[doc = "Cellular network radio type: gsm, cdma, lte..."]
8936    pub mavtype: CellularNetworkRadioType,
8937    #[doc = "Signal quality in percent. If unknown, set to UINT8_MAX"]
8938    pub quality: u8,
8939}
8940impl CELLULAR_STATUS_DATA {
8941    pub const ENCODED_LEN: usize = 10usize;
8942    pub const DEFAULT: Self = Self {
8943        mcc: 0_u16,
8944        mnc: 0_u16,
8945        lac: 0_u16,
8946        status: CellularStatusFlag::DEFAULT,
8947        failure_reason: CellularNetworkFailedReason::DEFAULT,
8948        mavtype: CellularNetworkRadioType::DEFAULT,
8949        quality: 0_u8,
8950    };
8951    #[cfg(feature = "arbitrary")]
8952    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8953        use arbitrary::{Arbitrary, Unstructured};
8954        let mut buf = [0u8; 1024];
8955        rng.fill_bytes(&mut buf);
8956        let mut unstructured = Unstructured::new(&buf);
8957        Self::arbitrary(&mut unstructured).unwrap_or_default()
8958    }
8959}
8960impl Default for CELLULAR_STATUS_DATA {
8961    fn default() -> Self {
8962        Self::DEFAULT.clone()
8963    }
8964}
8965impl MessageData for CELLULAR_STATUS_DATA {
8966    type Message = MavMessage;
8967    const ID: u32 = 334u32;
8968    const NAME: &'static str = "CELLULAR_STATUS";
8969    const EXTRA_CRC: u8 = 72u8;
8970    const ENCODED_LEN: usize = 10usize;
8971    fn deser(
8972        _version: MavlinkVersion,
8973        __input: &[u8],
8974    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8975        let avail_len = __input.len();
8976        let mut payload_buf = [0; Self::ENCODED_LEN];
8977        let mut buf = if avail_len < Self::ENCODED_LEN {
8978            payload_buf[0..avail_len].copy_from_slice(__input);
8979            Bytes::new(&payload_buf)
8980        } else {
8981            Bytes::new(__input)
8982        };
8983        let mut __struct = Self::default();
8984        __struct.mcc = buf.get_u16_le()?;
8985        __struct.mnc = buf.get_u16_le()?;
8986        __struct.lac = buf.get_u16_le()?;
8987        let tmp = buf.get_u8()?;
8988        __struct.status =
8989            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8990                enum_type: "CellularStatusFlag",
8991                value: tmp as u64,
8992            })?;
8993        let tmp = buf.get_u8()?;
8994        __struct.failure_reason =
8995            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8996                enum_type: "CellularNetworkFailedReason",
8997                value: tmp as u64,
8998            })?;
8999        let tmp = buf.get_u8()?;
9000        __struct.mavtype =
9001            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9002                enum_type: "CellularNetworkRadioType",
9003                value: tmp as u64,
9004            })?;
9005        __struct.quality = buf.get_u8()?;
9006        Ok(__struct)
9007    }
9008    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9009        let mut __tmp = BytesMut::new(bytes);
9010        #[allow(clippy::absurd_extreme_comparisons)]
9011        #[allow(unused_comparisons)]
9012        if __tmp.remaining() < Self::ENCODED_LEN {
9013            panic!(
9014                "buffer is too small (need {} bytes, but got {})",
9015                Self::ENCODED_LEN,
9016                __tmp.remaining(),
9017            )
9018        }
9019        __tmp.put_u16_le(self.mcc);
9020        __tmp.put_u16_le(self.mnc);
9021        __tmp.put_u16_le(self.lac);
9022        __tmp.put_u8(self.status as u8);
9023        __tmp.put_u8(self.failure_reason as u8);
9024        __tmp.put_u8(self.mavtype as u8);
9025        __tmp.put_u8(self.quality);
9026        if matches!(version, MavlinkVersion::V2) {
9027            let len = __tmp.len();
9028            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9029        } else {
9030            __tmp.len()
9031        }
9032    }
9033}
9034#[doc = "Request to control this MAV."]
9035#[doc = ""]
9036#[doc = "ID: 5"]
9037#[derive(Debug, Clone, PartialEq)]
9038#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9039#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9040#[cfg_attr(feature = "ts", derive(TS))]
9041#[cfg_attr(feature = "ts", ts(export))]
9042pub struct CHANGE_OPERATOR_CONTROL_DATA {
9043    #[doc = "System the GCS requests control for"]
9044    pub target_system: u8,
9045    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
9046    pub control_request: u8,
9047    #[doc = "0: key as plaintext, 1-255: future, different hashing/encryption variants. The GCS should in general use the safest mode possible initially and then gradually move down the encryption level if it gets a NACK message indicating an encryption mismatch."]
9048    pub version: u8,
9049    #[doc = "Password / Key, depending on version plaintext or encrypted. 25 or less characters, NULL terminated. The characters may involve A-Z, a-z, 0-9, and \"!?,.-\""]
9050    #[cfg_attr(feature = "ts", ts(type = "string"))]
9051    pub passkey: CharArray<25>,
9052}
9053impl CHANGE_OPERATOR_CONTROL_DATA {
9054    pub const ENCODED_LEN: usize = 28usize;
9055    pub const DEFAULT: Self = Self {
9056        target_system: 0_u8,
9057        control_request: 0_u8,
9058        version: 0_u8,
9059        passkey: CharArray::new([0_u8; 25usize]),
9060    };
9061    #[cfg(feature = "arbitrary")]
9062    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9063        use arbitrary::{Arbitrary, Unstructured};
9064        let mut buf = [0u8; 1024];
9065        rng.fill_bytes(&mut buf);
9066        let mut unstructured = Unstructured::new(&buf);
9067        Self::arbitrary(&mut unstructured).unwrap_or_default()
9068    }
9069}
9070impl Default for CHANGE_OPERATOR_CONTROL_DATA {
9071    fn default() -> Self {
9072        Self::DEFAULT.clone()
9073    }
9074}
9075impl MessageData for CHANGE_OPERATOR_CONTROL_DATA {
9076    type Message = MavMessage;
9077    const ID: u32 = 5u32;
9078    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL";
9079    const EXTRA_CRC: u8 = 217u8;
9080    const ENCODED_LEN: usize = 28usize;
9081    fn deser(
9082        _version: MavlinkVersion,
9083        __input: &[u8],
9084    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9085        let avail_len = __input.len();
9086        let mut payload_buf = [0; Self::ENCODED_LEN];
9087        let mut buf = if avail_len < Self::ENCODED_LEN {
9088            payload_buf[0..avail_len].copy_from_slice(__input);
9089            Bytes::new(&payload_buf)
9090        } else {
9091            Bytes::new(__input)
9092        };
9093        let mut __struct = Self::default();
9094        __struct.target_system = buf.get_u8()?;
9095        __struct.control_request = buf.get_u8()?;
9096        __struct.version = buf.get_u8()?;
9097        let mut tmp = [0_u8; 25usize];
9098        for v in &mut tmp {
9099            *v = buf.get_u8()?;
9100        }
9101        __struct.passkey = CharArray::new(tmp);
9102        Ok(__struct)
9103    }
9104    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9105        let mut __tmp = BytesMut::new(bytes);
9106        #[allow(clippy::absurd_extreme_comparisons)]
9107        #[allow(unused_comparisons)]
9108        if __tmp.remaining() < Self::ENCODED_LEN {
9109            panic!(
9110                "buffer is too small (need {} bytes, but got {})",
9111                Self::ENCODED_LEN,
9112                __tmp.remaining(),
9113            )
9114        }
9115        __tmp.put_u8(self.target_system);
9116        __tmp.put_u8(self.control_request);
9117        __tmp.put_u8(self.version);
9118        for val in &self.passkey {
9119            __tmp.put_u8(*val);
9120        }
9121        if matches!(version, MavlinkVersion::V2) {
9122            let len = __tmp.len();
9123            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9124        } else {
9125            __tmp.len()
9126        }
9127    }
9128}
9129#[doc = "Accept / deny control of this MAV."]
9130#[doc = ""]
9131#[doc = "ID: 6"]
9132#[derive(Debug, Clone, PartialEq)]
9133#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9134#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9135#[cfg_attr(feature = "ts", derive(TS))]
9136#[cfg_attr(feature = "ts", ts(export))]
9137pub struct CHANGE_OPERATOR_CONTROL_ACK_DATA {
9138    #[doc = "ID of the GCS this message"]
9139    pub gcs_system_id: u8,
9140    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
9141    pub control_request: u8,
9142    #[doc = "0: ACK, 1: NACK: Wrong passkey, 2: NACK: Unsupported passkey encryption method, 3: NACK: Already under control"]
9143    pub ack: u8,
9144}
9145impl CHANGE_OPERATOR_CONTROL_ACK_DATA {
9146    pub const ENCODED_LEN: usize = 3usize;
9147    pub const DEFAULT: Self = Self {
9148        gcs_system_id: 0_u8,
9149        control_request: 0_u8,
9150        ack: 0_u8,
9151    };
9152    #[cfg(feature = "arbitrary")]
9153    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9154        use arbitrary::{Arbitrary, Unstructured};
9155        let mut buf = [0u8; 1024];
9156        rng.fill_bytes(&mut buf);
9157        let mut unstructured = Unstructured::new(&buf);
9158        Self::arbitrary(&mut unstructured).unwrap_or_default()
9159    }
9160}
9161impl Default for CHANGE_OPERATOR_CONTROL_ACK_DATA {
9162    fn default() -> Self {
9163        Self::DEFAULT.clone()
9164    }
9165}
9166impl MessageData for CHANGE_OPERATOR_CONTROL_ACK_DATA {
9167    type Message = MavMessage;
9168    const ID: u32 = 6u32;
9169    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL_ACK";
9170    const EXTRA_CRC: u8 = 104u8;
9171    const ENCODED_LEN: usize = 3usize;
9172    fn deser(
9173        _version: MavlinkVersion,
9174        __input: &[u8],
9175    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9176        let avail_len = __input.len();
9177        let mut payload_buf = [0; Self::ENCODED_LEN];
9178        let mut buf = if avail_len < Self::ENCODED_LEN {
9179            payload_buf[0..avail_len].copy_from_slice(__input);
9180            Bytes::new(&payload_buf)
9181        } else {
9182            Bytes::new(__input)
9183        };
9184        let mut __struct = Self::default();
9185        __struct.gcs_system_id = buf.get_u8()?;
9186        __struct.control_request = buf.get_u8()?;
9187        __struct.ack = buf.get_u8()?;
9188        Ok(__struct)
9189    }
9190    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9191        let mut __tmp = BytesMut::new(bytes);
9192        #[allow(clippy::absurd_extreme_comparisons)]
9193        #[allow(unused_comparisons)]
9194        if __tmp.remaining() < Self::ENCODED_LEN {
9195            panic!(
9196                "buffer is too small (need {} bytes, but got {})",
9197                Self::ENCODED_LEN,
9198                __tmp.remaining(),
9199            )
9200        }
9201        __tmp.put_u8(self.gcs_system_id);
9202        __tmp.put_u8(self.control_request);
9203        __tmp.put_u8(self.ack);
9204        if matches!(version, MavlinkVersion::V2) {
9205            let len = __tmp.len();
9206            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9207        } else {
9208            __tmp.len()
9209        }
9210    }
9211}
9212#[doc = "Information about a potential collision."]
9213#[doc = ""]
9214#[doc = "ID: 247"]
9215#[derive(Debug, Clone, PartialEq)]
9216#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9217#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9218#[cfg_attr(feature = "ts", derive(TS))]
9219#[cfg_attr(feature = "ts", ts(export))]
9220pub struct COLLISION_DATA {
9221    #[doc = "Unique identifier, domain based on src field"]
9222    pub id: u32,
9223    #[doc = "Estimated time until collision occurs"]
9224    pub time_to_minimum_delta: f32,
9225    #[doc = "Closest vertical distance between vehicle and object"]
9226    pub altitude_minimum_delta: f32,
9227    #[doc = "Closest horizontal distance between vehicle and object"]
9228    pub horizontal_minimum_delta: f32,
9229    #[doc = "Collision data source"]
9230    pub src: MavCollisionSrc,
9231    #[doc = "Action that is being taken to avoid this collision"]
9232    pub action: MavCollisionAction,
9233    #[doc = "How concerned the aircraft is about this collision"]
9234    pub threat_level: MavCollisionThreatLevel,
9235}
9236impl COLLISION_DATA {
9237    pub const ENCODED_LEN: usize = 19usize;
9238    pub const DEFAULT: Self = Self {
9239        id: 0_u32,
9240        time_to_minimum_delta: 0.0_f32,
9241        altitude_minimum_delta: 0.0_f32,
9242        horizontal_minimum_delta: 0.0_f32,
9243        src: MavCollisionSrc::DEFAULT,
9244        action: MavCollisionAction::DEFAULT,
9245        threat_level: MavCollisionThreatLevel::DEFAULT,
9246    };
9247    #[cfg(feature = "arbitrary")]
9248    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9249        use arbitrary::{Arbitrary, Unstructured};
9250        let mut buf = [0u8; 1024];
9251        rng.fill_bytes(&mut buf);
9252        let mut unstructured = Unstructured::new(&buf);
9253        Self::arbitrary(&mut unstructured).unwrap_or_default()
9254    }
9255}
9256impl Default for COLLISION_DATA {
9257    fn default() -> Self {
9258        Self::DEFAULT.clone()
9259    }
9260}
9261impl MessageData for COLLISION_DATA {
9262    type Message = MavMessage;
9263    const ID: u32 = 247u32;
9264    const NAME: &'static str = "COLLISION";
9265    const EXTRA_CRC: u8 = 81u8;
9266    const ENCODED_LEN: usize = 19usize;
9267    fn deser(
9268        _version: MavlinkVersion,
9269        __input: &[u8],
9270    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9271        let avail_len = __input.len();
9272        let mut payload_buf = [0; Self::ENCODED_LEN];
9273        let mut buf = if avail_len < Self::ENCODED_LEN {
9274            payload_buf[0..avail_len].copy_from_slice(__input);
9275            Bytes::new(&payload_buf)
9276        } else {
9277            Bytes::new(__input)
9278        };
9279        let mut __struct = Self::default();
9280        __struct.id = buf.get_u32_le()?;
9281        __struct.time_to_minimum_delta = buf.get_f32_le()?;
9282        __struct.altitude_minimum_delta = buf.get_f32_le()?;
9283        __struct.horizontal_minimum_delta = buf.get_f32_le()?;
9284        let tmp = buf.get_u8()?;
9285        __struct.src =
9286            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9287                enum_type: "MavCollisionSrc",
9288                value: tmp as u64,
9289            })?;
9290        let tmp = buf.get_u8()?;
9291        __struct.action =
9292            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9293                enum_type: "MavCollisionAction",
9294                value: tmp as u64,
9295            })?;
9296        let tmp = buf.get_u8()?;
9297        __struct.threat_level =
9298            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9299                enum_type: "MavCollisionThreatLevel",
9300                value: tmp as u64,
9301            })?;
9302        Ok(__struct)
9303    }
9304    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9305        let mut __tmp = BytesMut::new(bytes);
9306        #[allow(clippy::absurd_extreme_comparisons)]
9307        #[allow(unused_comparisons)]
9308        if __tmp.remaining() < Self::ENCODED_LEN {
9309            panic!(
9310                "buffer is too small (need {} bytes, but got {})",
9311                Self::ENCODED_LEN,
9312                __tmp.remaining(),
9313            )
9314        }
9315        __tmp.put_u32_le(self.id);
9316        __tmp.put_f32_le(self.time_to_minimum_delta);
9317        __tmp.put_f32_le(self.altitude_minimum_delta);
9318        __tmp.put_f32_le(self.horizontal_minimum_delta);
9319        __tmp.put_u8(self.src as u8);
9320        __tmp.put_u8(self.action as u8);
9321        __tmp.put_u8(self.threat_level as u8);
9322        if matches!(version, MavlinkVersion::V2) {
9323            let len = __tmp.len();
9324            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9325        } else {
9326            __tmp.len()
9327        }
9328    }
9329}
9330#[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9331#[doc = ""]
9332#[doc = "ID: 77"]
9333#[derive(Debug, Clone, PartialEq)]
9334#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9335#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9336#[cfg_attr(feature = "ts", derive(TS))]
9337#[cfg_attr(feature = "ts", ts(export))]
9338pub struct COMMAND_ACK_DATA {
9339    #[doc = "Command ID (of acknowledged command)."]
9340    pub command: MavCmd,
9341    #[doc = "Result of command."]
9342    pub result: MavResult,
9343    #[doc = "The progress percentage when result is MAV_RESULT_IN_PROGRESS. Values: [0-100], or UINT8_MAX if the progress is unknown."]
9344    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9345    pub progress: u8,
9346    #[doc = "Additional result information. Can be set with a command-specific enum containing command-specific error reasons for why the command might be denied. If used, the associated enum must be documented in the corresponding MAV_CMD (this enum should have a 0 value to indicate \"unused\" or \"unknown\")."]
9347    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9348    pub result_param2: i32,
9349    #[doc = "System ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
9350    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9351    pub target_system: u8,
9352    #[doc = "Component ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
9353    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
9354    pub target_component: u8,
9355}
9356impl COMMAND_ACK_DATA {
9357    pub const ENCODED_LEN: usize = 10usize;
9358    pub const DEFAULT: Self = Self {
9359        command: MavCmd::DEFAULT,
9360        result: MavResult::DEFAULT,
9361        progress: 0_u8,
9362        result_param2: 0_i32,
9363        target_system: 0_u8,
9364        target_component: 0_u8,
9365    };
9366    #[cfg(feature = "arbitrary")]
9367    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9368        use arbitrary::{Arbitrary, Unstructured};
9369        let mut buf = [0u8; 1024];
9370        rng.fill_bytes(&mut buf);
9371        let mut unstructured = Unstructured::new(&buf);
9372        Self::arbitrary(&mut unstructured).unwrap_or_default()
9373    }
9374}
9375impl Default for COMMAND_ACK_DATA {
9376    fn default() -> Self {
9377        Self::DEFAULT.clone()
9378    }
9379}
9380impl MessageData for COMMAND_ACK_DATA {
9381    type Message = MavMessage;
9382    const ID: u32 = 77u32;
9383    const NAME: &'static str = "COMMAND_ACK";
9384    const EXTRA_CRC: u8 = 143u8;
9385    const ENCODED_LEN: usize = 10usize;
9386    fn deser(
9387        _version: MavlinkVersion,
9388        __input: &[u8],
9389    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9390        let avail_len = __input.len();
9391        let mut payload_buf = [0; Self::ENCODED_LEN];
9392        let mut buf = if avail_len < Self::ENCODED_LEN {
9393            payload_buf[0..avail_len].copy_from_slice(__input);
9394            Bytes::new(&payload_buf)
9395        } else {
9396            Bytes::new(__input)
9397        };
9398        let mut __struct = Self::default();
9399        let tmp = buf.get_u16_le()?;
9400        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9401            ::mavlink_core::error::ParserError::InvalidEnum {
9402                enum_type: "MavCmd",
9403                value: tmp as u64,
9404            },
9405        )?;
9406        let tmp = buf.get_u8()?;
9407        __struct.result =
9408            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9409                enum_type: "MavResult",
9410                value: tmp as u64,
9411            })?;
9412        __struct.progress = buf.get_u8()?;
9413        __struct.result_param2 = buf.get_i32_le()?;
9414        __struct.target_system = buf.get_u8()?;
9415        __struct.target_component = buf.get_u8()?;
9416        Ok(__struct)
9417    }
9418    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9419        let mut __tmp = BytesMut::new(bytes);
9420        #[allow(clippy::absurd_extreme_comparisons)]
9421        #[allow(unused_comparisons)]
9422        if __tmp.remaining() < Self::ENCODED_LEN {
9423            panic!(
9424                "buffer is too small (need {} bytes, but got {})",
9425                Self::ENCODED_LEN,
9426                __tmp.remaining(),
9427            )
9428        }
9429        __tmp.put_u16_le(self.command as u16);
9430        __tmp.put_u8(self.result as u8);
9431        if matches!(version, MavlinkVersion::V2) {
9432            __tmp.put_u8(self.progress);
9433            __tmp.put_i32_le(self.result_param2);
9434            __tmp.put_u8(self.target_system);
9435            __tmp.put_u8(self.target_component);
9436            let len = __tmp.len();
9437            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9438        } else {
9439            __tmp.len()
9440        }
9441    }
9442}
9443#[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9444#[doc = ""]
9445#[doc = "ID: 80"]
9446#[derive(Debug, Clone, PartialEq)]
9447#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9448#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9449#[cfg_attr(feature = "ts", derive(TS))]
9450#[cfg_attr(feature = "ts", ts(export))]
9451pub struct COMMAND_CANCEL_DATA {
9452    #[doc = "Command ID (of command to cancel)."]
9453    pub command: MavCmd,
9454    #[doc = "System executing long running command. Should not be broadcast (0)."]
9455    pub target_system: u8,
9456    #[doc = "Component executing long running command."]
9457    pub target_component: u8,
9458}
9459impl COMMAND_CANCEL_DATA {
9460    pub const ENCODED_LEN: usize = 4usize;
9461    pub const DEFAULT: Self = Self {
9462        command: MavCmd::DEFAULT,
9463        target_system: 0_u8,
9464        target_component: 0_u8,
9465    };
9466    #[cfg(feature = "arbitrary")]
9467    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9468        use arbitrary::{Arbitrary, Unstructured};
9469        let mut buf = [0u8; 1024];
9470        rng.fill_bytes(&mut buf);
9471        let mut unstructured = Unstructured::new(&buf);
9472        Self::arbitrary(&mut unstructured).unwrap_or_default()
9473    }
9474}
9475impl Default for COMMAND_CANCEL_DATA {
9476    fn default() -> Self {
9477        Self::DEFAULT.clone()
9478    }
9479}
9480impl MessageData for COMMAND_CANCEL_DATA {
9481    type Message = MavMessage;
9482    const ID: u32 = 80u32;
9483    const NAME: &'static str = "COMMAND_CANCEL";
9484    const EXTRA_CRC: u8 = 14u8;
9485    const ENCODED_LEN: usize = 4usize;
9486    fn deser(
9487        _version: MavlinkVersion,
9488        __input: &[u8],
9489    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9490        let avail_len = __input.len();
9491        let mut payload_buf = [0; Self::ENCODED_LEN];
9492        let mut buf = if avail_len < Self::ENCODED_LEN {
9493            payload_buf[0..avail_len].copy_from_slice(__input);
9494            Bytes::new(&payload_buf)
9495        } else {
9496            Bytes::new(__input)
9497        };
9498        let mut __struct = Self::default();
9499        let tmp = buf.get_u16_le()?;
9500        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9501            ::mavlink_core::error::ParserError::InvalidEnum {
9502                enum_type: "MavCmd",
9503                value: tmp as u64,
9504            },
9505        )?;
9506        __struct.target_system = buf.get_u8()?;
9507        __struct.target_component = buf.get_u8()?;
9508        Ok(__struct)
9509    }
9510    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9511        let mut __tmp = BytesMut::new(bytes);
9512        #[allow(clippy::absurd_extreme_comparisons)]
9513        #[allow(unused_comparisons)]
9514        if __tmp.remaining() < Self::ENCODED_LEN {
9515            panic!(
9516                "buffer is too small (need {} bytes, but got {})",
9517                Self::ENCODED_LEN,
9518                __tmp.remaining(),
9519            )
9520        }
9521        __tmp.put_u16_le(self.command as u16);
9522        __tmp.put_u8(self.target_system);
9523        __tmp.put_u8(self.target_component);
9524        if matches!(version, MavlinkVersion::V2) {
9525            let len = __tmp.len();
9526            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9527        } else {
9528            __tmp.len()
9529        }
9530    }
9531}
9532#[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9533#[doc = ""]
9534#[doc = "ID: 75"]
9535#[derive(Debug, Clone, PartialEq)]
9536#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9537#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9538#[cfg_attr(feature = "ts", derive(TS))]
9539#[cfg_attr(feature = "ts", ts(export))]
9540pub struct COMMAND_INT_DATA {
9541    #[doc = "PARAM1, see MAV_CMD enum"]
9542    pub param1: f32,
9543    #[doc = "PARAM2, see MAV_CMD enum"]
9544    pub param2: f32,
9545    #[doc = "PARAM3, see MAV_CMD enum"]
9546    pub param3: f32,
9547    #[doc = "PARAM4, see MAV_CMD enum"]
9548    pub param4: f32,
9549    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
9550    pub x: i32,
9551    #[doc = "PARAM6 / local: y position in meters * 1e4, global: longitude in degrees * 10^7"]
9552    pub y: i32,
9553    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame)."]
9554    pub z: f32,
9555    #[doc = "The scheduled action for the mission item."]
9556    pub command: MavCmd,
9557    #[doc = "System ID"]
9558    pub target_system: u8,
9559    #[doc = "Component ID"]
9560    pub target_component: u8,
9561    #[doc = "The coordinate system of the COMMAND."]
9562    pub frame: MavFrame,
9563    #[doc = "Not used."]
9564    pub current: u8,
9565    #[doc = "Not used (set 0)."]
9566    pub autocontinue: u8,
9567}
9568impl COMMAND_INT_DATA {
9569    pub const ENCODED_LEN: usize = 35usize;
9570    pub const DEFAULT: Self = Self {
9571        param1: 0.0_f32,
9572        param2: 0.0_f32,
9573        param3: 0.0_f32,
9574        param4: 0.0_f32,
9575        x: 0_i32,
9576        y: 0_i32,
9577        z: 0.0_f32,
9578        command: MavCmd::DEFAULT,
9579        target_system: 0_u8,
9580        target_component: 0_u8,
9581        frame: MavFrame::DEFAULT,
9582        current: 0_u8,
9583        autocontinue: 0_u8,
9584    };
9585    #[cfg(feature = "arbitrary")]
9586    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9587        use arbitrary::{Arbitrary, Unstructured};
9588        let mut buf = [0u8; 1024];
9589        rng.fill_bytes(&mut buf);
9590        let mut unstructured = Unstructured::new(&buf);
9591        Self::arbitrary(&mut unstructured).unwrap_or_default()
9592    }
9593}
9594impl Default for COMMAND_INT_DATA {
9595    fn default() -> Self {
9596        Self::DEFAULT.clone()
9597    }
9598}
9599impl MessageData for COMMAND_INT_DATA {
9600    type Message = MavMessage;
9601    const ID: u32 = 75u32;
9602    const NAME: &'static str = "COMMAND_INT";
9603    const EXTRA_CRC: u8 = 158u8;
9604    const ENCODED_LEN: usize = 35usize;
9605    fn deser(
9606        _version: MavlinkVersion,
9607        __input: &[u8],
9608    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9609        let avail_len = __input.len();
9610        let mut payload_buf = [0; Self::ENCODED_LEN];
9611        let mut buf = if avail_len < Self::ENCODED_LEN {
9612            payload_buf[0..avail_len].copy_from_slice(__input);
9613            Bytes::new(&payload_buf)
9614        } else {
9615            Bytes::new(__input)
9616        };
9617        let mut __struct = Self::default();
9618        __struct.param1 = buf.get_f32_le()?;
9619        __struct.param2 = buf.get_f32_le()?;
9620        __struct.param3 = buf.get_f32_le()?;
9621        __struct.param4 = buf.get_f32_le()?;
9622        __struct.x = buf.get_i32_le()?;
9623        __struct.y = buf.get_i32_le()?;
9624        __struct.z = buf.get_f32_le()?;
9625        let tmp = buf.get_u16_le()?;
9626        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9627            ::mavlink_core::error::ParserError::InvalidEnum {
9628                enum_type: "MavCmd",
9629                value: tmp as u64,
9630            },
9631        )?;
9632        __struct.target_system = buf.get_u8()?;
9633        __struct.target_component = buf.get_u8()?;
9634        let tmp = buf.get_u8()?;
9635        __struct.frame =
9636            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9637                enum_type: "MavFrame",
9638                value: tmp as u64,
9639            })?;
9640        __struct.current = buf.get_u8()?;
9641        __struct.autocontinue = buf.get_u8()?;
9642        Ok(__struct)
9643    }
9644    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9645        let mut __tmp = BytesMut::new(bytes);
9646        #[allow(clippy::absurd_extreme_comparisons)]
9647        #[allow(unused_comparisons)]
9648        if __tmp.remaining() < Self::ENCODED_LEN {
9649            panic!(
9650                "buffer is too small (need {} bytes, but got {})",
9651                Self::ENCODED_LEN,
9652                __tmp.remaining(),
9653            )
9654        }
9655        __tmp.put_f32_le(self.param1);
9656        __tmp.put_f32_le(self.param2);
9657        __tmp.put_f32_le(self.param3);
9658        __tmp.put_f32_le(self.param4);
9659        __tmp.put_i32_le(self.x);
9660        __tmp.put_i32_le(self.y);
9661        __tmp.put_f32_le(self.z);
9662        __tmp.put_u16_le(self.command as u16);
9663        __tmp.put_u8(self.target_system);
9664        __tmp.put_u8(self.target_component);
9665        __tmp.put_u8(self.frame as u8);
9666        __tmp.put_u8(self.current);
9667        __tmp.put_u8(self.autocontinue);
9668        if matches!(version, MavlinkVersion::V2) {
9669            let len = __tmp.len();
9670            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9671        } else {
9672            __tmp.len()
9673        }
9674    }
9675}
9676#[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9677#[doc = ""]
9678#[doc = "ID: 76"]
9679#[derive(Debug, Clone, PartialEq)]
9680#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9681#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9682#[cfg_attr(feature = "ts", derive(TS))]
9683#[cfg_attr(feature = "ts", ts(export))]
9684pub struct COMMAND_LONG_DATA {
9685    #[doc = "Parameter 1 (for the specific command)."]
9686    pub param1: f32,
9687    #[doc = "Parameter 2 (for the specific command)."]
9688    pub param2: f32,
9689    #[doc = "Parameter 3 (for the specific command)."]
9690    pub param3: f32,
9691    #[doc = "Parameter 4 (for the specific command)."]
9692    pub param4: f32,
9693    #[doc = "Parameter 5 (for the specific command)."]
9694    pub param5: f32,
9695    #[doc = "Parameter 6 (for the specific command)."]
9696    pub param6: f32,
9697    #[doc = "Parameter 7 (for the specific command)."]
9698    pub param7: f32,
9699    #[doc = "Command ID (of command to send)."]
9700    pub command: MavCmd,
9701    #[doc = "System which should execute the command"]
9702    pub target_system: u8,
9703    #[doc = "Component which should execute the command, 0 for all components"]
9704    pub target_component: u8,
9705    #[doc = "0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command)"]
9706    pub confirmation: u8,
9707}
9708impl COMMAND_LONG_DATA {
9709    pub const ENCODED_LEN: usize = 33usize;
9710    pub const DEFAULT: Self = Self {
9711        param1: 0.0_f32,
9712        param2: 0.0_f32,
9713        param3: 0.0_f32,
9714        param4: 0.0_f32,
9715        param5: 0.0_f32,
9716        param6: 0.0_f32,
9717        param7: 0.0_f32,
9718        command: MavCmd::DEFAULT,
9719        target_system: 0_u8,
9720        target_component: 0_u8,
9721        confirmation: 0_u8,
9722    };
9723    #[cfg(feature = "arbitrary")]
9724    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9725        use arbitrary::{Arbitrary, Unstructured};
9726        let mut buf = [0u8; 1024];
9727        rng.fill_bytes(&mut buf);
9728        let mut unstructured = Unstructured::new(&buf);
9729        Self::arbitrary(&mut unstructured).unwrap_or_default()
9730    }
9731}
9732impl Default for COMMAND_LONG_DATA {
9733    fn default() -> Self {
9734        Self::DEFAULT.clone()
9735    }
9736}
9737impl MessageData for COMMAND_LONG_DATA {
9738    type Message = MavMessage;
9739    const ID: u32 = 76u32;
9740    const NAME: &'static str = "COMMAND_LONG";
9741    const EXTRA_CRC: u8 = 152u8;
9742    const ENCODED_LEN: usize = 33usize;
9743    fn deser(
9744        _version: MavlinkVersion,
9745        __input: &[u8],
9746    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9747        let avail_len = __input.len();
9748        let mut payload_buf = [0; Self::ENCODED_LEN];
9749        let mut buf = if avail_len < Self::ENCODED_LEN {
9750            payload_buf[0..avail_len].copy_from_slice(__input);
9751            Bytes::new(&payload_buf)
9752        } else {
9753            Bytes::new(__input)
9754        };
9755        let mut __struct = Self::default();
9756        __struct.param1 = buf.get_f32_le()?;
9757        __struct.param2 = buf.get_f32_le()?;
9758        __struct.param3 = buf.get_f32_le()?;
9759        __struct.param4 = buf.get_f32_le()?;
9760        __struct.param5 = buf.get_f32_le()?;
9761        __struct.param6 = buf.get_f32_le()?;
9762        __struct.param7 = buf.get_f32_le()?;
9763        let tmp = buf.get_u16_le()?;
9764        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9765            ::mavlink_core::error::ParserError::InvalidEnum {
9766                enum_type: "MavCmd",
9767                value: tmp as u64,
9768            },
9769        )?;
9770        __struct.target_system = buf.get_u8()?;
9771        __struct.target_component = buf.get_u8()?;
9772        __struct.confirmation = buf.get_u8()?;
9773        Ok(__struct)
9774    }
9775    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9776        let mut __tmp = BytesMut::new(bytes);
9777        #[allow(clippy::absurd_extreme_comparisons)]
9778        #[allow(unused_comparisons)]
9779        if __tmp.remaining() < Self::ENCODED_LEN {
9780            panic!(
9781                "buffer is too small (need {} bytes, but got {})",
9782                Self::ENCODED_LEN,
9783                __tmp.remaining(),
9784            )
9785        }
9786        __tmp.put_f32_le(self.param1);
9787        __tmp.put_f32_le(self.param2);
9788        __tmp.put_f32_le(self.param3);
9789        __tmp.put_f32_le(self.param4);
9790        __tmp.put_f32_le(self.param5);
9791        __tmp.put_f32_le(self.param6);
9792        __tmp.put_f32_le(self.param7);
9793        __tmp.put_u16_le(self.command as u16);
9794        __tmp.put_u8(self.target_system);
9795        __tmp.put_u8(self.target_component);
9796        __tmp.put_u8(self.confirmation);
9797        if matches!(version, MavlinkVersion::V2) {
9798            let len = __tmp.len();
9799            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9800        } else {
9801            __tmp.len()
9802        }
9803    }
9804}
9805#[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
9806#[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
9807#[doc = ""]
9808#[doc = "ID: 395"]
9809#[derive(Debug, Clone, PartialEq)]
9810#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9811#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9812#[cfg_attr(feature = "ts", derive(TS))]
9813#[cfg_attr(feature = "ts", ts(export))]
9814pub struct COMPONENT_INFORMATION_DATA {
9815    #[doc = "Timestamp (time since system boot)."]
9816    pub time_boot_ms: u32,
9817    #[doc = "CRC32 of the general metadata file (general_metadata_uri)."]
9818    pub general_metadata_file_crc: u32,
9819    #[doc = "CRC32 of peripherals metadata file (peripherals_metadata_uri)."]
9820    pub peripherals_metadata_file_crc: u32,
9821    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
9822    #[cfg_attr(feature = "ts", ts(type = "string"))]
9823    pub general_metadata_uri: CharArray<100>,
9824    #[doc = "(Optional) MAVLink FTP URI for the peripherals metadata file (COMP_METADATA_TYPE_PERIPHERALS), which may be compressed with xz. This contains data about \"attached components\" such as UAVCAN nodes. The peripherals are in a separate file because the information must be generated dynamically at runtime. The string needs to be zero terminated."]
9825    #[cfg_attr(feature = "ts", ts(type = "string"))]
9826    pub peripherals_metadata_uri: CharArray<100>,
9827}
9828impl COMPONENT_INFORMATION_DATA {
9829    pub const ENCODED_LEN: usize = 212usize;
9830    pub const DEFAULT: Self = Self {
9831        time_boot_ms: 0_u32,
9832        general_metadata_file_crc: 0_u32,
9833        peripherals_metadata_file_crc: 0_u32,
9834        general_metadata_uri: CharArray::new([0_u8; 100usize]),
9835        peripherals_metadata_uri: CharArray::new([0_u8; 100usize]),
9836    };
9837    #[cfg(feature = "arbitrary")]
9838    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9839        use arbitrary::{Arbitrary, Unstructured};
9840        let mut buf = [0u8; 1024];
9841        rng.fill_bytes(&mut buf);
9842        let mut unstructured = Unstructured::new(&buf);
9843        Self::arbitrary(&mut unstructured).unwrap_or_default()
9844    }
9845}
9846impl Default for COMPONENT_INFORMATION_DATA {
9847    fn default() -> Self {
9848        Self::DEFAULT.clone()
9849    }
9850}
9851impl MessageData for COMPONENT_INFORMATION_DATA {
9852    type Message = MavMessage;
9853    const ID: u32 = 395u32;
9854    const NAME: &'static str = "COMPONENT_INFORMATION";
9855    const EXTRA_CRC: u8 = 0u8;
9856    const ENCODED_LEN: usize = 212usize;
9857    fn deser(
9858        _version: MavlinkVersion,
9859        __input: &[u8],
9860    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9861        let avail_len = __input.len();
9862        let mut payload_buf = [0; Self::ENCODED_LEN];
9863        let mut buf = if avail_len < Self::ENCODED_LEN {
9864            payload_buf[0..avail_len].copy_from_slice(__input);
9865            Bytes::new(&payload_buf)
9866        } else {
9867            Bytes::new(__input)
9868        };
9869        let mut __struct = Self::default();
9870        __struct.time_boot_ms = buf.get_u32_le()?;
9871        __struct.general_metadata_file_crc = buf.get_u32_le()?;
9872        __struct.peripherals_metadata_file_crc = buf.get_u32_le()?;
9873        let mut tmp = [0_u8; 100usize];
9874        for v in &mut tmp {
9875            *v = buf.get_u8()?;
9876        }
9877        __struct.general_metadata_uri = CharArray::new(tmp);
9878        let mut tmp = [0_u8; 100usize];
9879        for v in &mut tmp {
9880            *v = buf.get_u8()?;
9881        }
9882        __struct.peripherals_metadata_uri = CharArray::new(tmp);
9883        Ok(__struct)
9884    }
9885    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9886        let mut __tmp = BytesMut::new(bytes);
9887        #[allow(clippy::absurd_extreme_comparisons)]
9888        #[allow(unused_comparisons)]
9889        if __tmp.remaining() < Self::ENCODED_LEN {
9890            panic!(
9891                "buffer is too small (need {} bytes, but got {})",
9892                Self::ENCODED_LEN,
9893                __tmp.remaining(),
9894            )
9895        }
9896        __tmp.put_u32_le(self.time_boot_ms);
9897        __tmp.put_u32_le(self.general_metadata_file_crc);
9898        __tmp.put_u32_le(self.peripherals_metadata_file_crc);
9899        for val in &self.general_metadata_uri {
9900            __tmp.put_u8(*val);
9901        }
9902        for val in &self.peripherals_metadata_uri {
9903            __tmp.put_u8(*val);
9904        }
9905        if matches!(version, MavlinkVersion::V2) {
9906            let len = __tmp.len();
9907            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9908        } else {
9909            __tmp.len()
9910        }
9911    }
9912}
9913#[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
9914#[doc = ""]
9915#[doc = "ID: 396"]
9916#[derive(Debug, Clone, PartialEq)]
9917#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9918#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9919#[cfg_attr(feature = "ts", derive(TS))]
9920#[cfg_attr(feature = "ts", ts(export))]
9921pub struct COMPONENT_INFORMATION_BASIC_DATA {
9922    #[doc = "Component capability flags"]
9923    pub capabilities: MavProtocolCapability,
9924    #[doc = "Timestamp (time since system boot)."]
9925    pub time_boot_ms: u32,
9926    #[doc = "Date of manufacture as a UNIX Epoch time (since 1.1.1970) in seconds."]
9927    pub time_manufacture_s: u32,
9928    #[doc = "Name of the component vendor. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
9929    #[cfg_attr(feature = "ts", ts(type = "string"))]
9930    pub vendor_name: CharArray<32>,
9931    #[doc = "Name of the component model. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
9932    #[cfg_attr(feature = "ts", ts(type = "string"))]
9933    pub model_name: CharArray<32>,
9934    #[doc = "Software version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9935    #[cfg_attr(feature = "ts", ts(type = "string"))]
9936    pub software_version: CharArray<24>,
9937    #[doc = "Hardware version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9938    #[cfg_attr(feature = "ts", ts(type = "string"))]
9939    pub hardware_version: CharArray<24>,
9940    #[doc = "Hardware serial number. The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9941    #[cfg_attr(feature = "ts", ts(type = "string"))]
9942    pub serial_number: CharArray<32>,
9943}
9944impl COMPONENT_INFORMATION_BASIC_DATA {
9945    pub const ENCODED_LEN: usize = 160usize;
9946    pub const DEFAULT: Self = Self {
9947        capabilities: MavProtocolCapability::DEFAULT,
9948        time_boot_ms: 0_u32,
9949        time_manufacture_s: 0_u32,
9950        vendor_name: CharArray::new([0_u8; 32usize]),
9951        model_name: CharArray::new([0_u8; 32usize]),
9952        software_version: CharArray::new([0_u8; 24usize]),
9953        hardware_version: CharArray::new([0_u8; 24usize]),
9954        serial_number: CharArray::new([0_u8; 32usize]),
9955    };
9956    #[cfg(feature = "arbitrary")]
9957    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9958        use arbitrary::{Arbitrary, Unstructured};
9959        let mut buf = [0u8; 1024];
9960        rng.fill_bytes(&mut buf);
9961        let mut unstructured = Unstructured::new(&buf);
9962        Self::arbitrary(&mut unstructured).unwrap_or_default()
9963    }
9964}
9965impl Default for COMPONENT_INFORMATION_BASIC_DATA {
9966    fn default() -> Self {
9967        Self::DEFAULT.clone()
9968    }
9969}
9970impl MessageData for COMPONENT_INFORMATION_BASIC_DATA {
9971    type Message = MavMessage;
9972    const ID: u32 = 396u32;
9973    const NAME: &'static str = "COMPONENT_INFORMATION_BASIC";
9974    const EXTRA_CRC: u8 = 50u8;
9975    const ENCODED_LEN: usize = 160usize;
9976    fn deser(
9977        _version: MavlinkVersion,
9978        __input: &[u8],
9979    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9980        let avail_len = __input.len();
9981        let mut payload_buf = [0; Self::ENCODED_LEN];
9982        let mut buf = if avail_len < Self::ENCODED_LEN {
9983            payload_buf[0..avail_len].copy_from_slice(__input);
9984            Bytes::new(&payload_buf)
9985        } else {
9986            Bytes::new(__input)
9987        };
9988        let mut __struct = Self::default();
9989        let tmp = buf.get_u64_le()?;
9990        __struct.capabilities = MavProtocolCapability::from_bits(
9991            tmp as <MavProtocolCapability as Flags>::Bits,
9992        )
9993        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
9994            flag_type: "MavProtocolCapability",
9995            value: tmp as u64,
9996        })?;
9997        __struct.time_boot_ms = buf.get_u32_le()?;
9998        __struct.time_manufacture_s = buf.get_u32_le()?;
9999        let mut tmp = [0_u8; 32usize];
10000        for v in &mut tmp {
10001            *v = buf.get_u8()?;
10002        }
10003        __struct.vendor_name = CharArray::new(tmp);
10004        let mut tmp = [0_u8; 32usize];
10005        for v in &mut tmp {
10006            *v = buf.get_u8()?;
10007        }
10008        __struct.model_name = CharArray::new(tmp);
10009        let mut tmp = [0_u8; 24usize];
10010        for v in &mut tmp {
10011            *v = buf.get_u8()?;
10012        }
10013        __struct.software_version = CharArray::new(tmp);
10014        let mut tmp = [0_u8; 24usize];
10015        for v in &mut tmp {
10016            *v = buf.get_u8()?;
10017        }
10018        __struct.hardware_version = CharArray::new(tmp);
10019        let mut tmp = [0_u8; 32usize];
10020        for v in &mut tmp {
10021            *v = buf.get_u8()?;
10022        }
10023        __struct.serial_number = CharArray::new(tmp);
10024        Ok(__struct)
10025    }
10026    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10027        let mut __tmp = BytesMut::new(bytes);
10028        #[allow(clippy::absurd_extreme_comparisons)]
10029        #[allow(unused_comparisons)]
10030        if __tmp.remaining() < Self::ENCODED_LEN {
10031            panic!(
10032                "buffer is too small (need {} bytes, but got {})",
10033                Self::ENCODED_LEN,
10034                __tmp.remaining(),
10035            )
10036        }
10037        __tmp.put_u64_le(self.capabilities.bits() as u64);
10038        __tmp.put_u32_le(self.time_boot_ms);
10039        __tmp.put_u32_le(self.time_manufacture_s);
10040        for val in &self.vendor_name {
10041            __tmp.put_u8(*val);
10042        }
10043        for val in &self.model_name {
10044            __tmp.put_u8(*val);
10045        }
10046        for val in &self.software_version {
10047            __tmp.put_u8(*val);
10048        }
10049        for val in &self.hardware_version {
10050            __tmp.put_u8(*val);
10051        }
10052        for val in &self.serial_number {
10053            __tmp.put_u8(*val);
10054        }
10055        if matches!(version, MavlinkVersion::V2) {
10056            let len = __tmp.len();
10057            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10058        } else {
10059            __tmp.len()
10060        }
10061    }
10062}
10063#[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
10064#[doc = ""]
10065#[doc = "ID: 397"]
10066#[derive(Debug, Clone, PartialEq)]
10067#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10068#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10069#[cfg_attr(feature = "ts", derive(TS))]
10070#[cfg_attr(feature = "ts", ts(export))]
10071pub struct COMPONENT_METADATA_DATA {
10072    #[doc = "Timestamp (time since system boot)."]
10073    pub time_boot_ms: u32,
10074    #[doc = "CRC32 of the general metadata file."]
10075    pub file_crc: u32,
10076    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
10077    #[cfg_attr(feature = "ts", ts(type = "string"))]
10078    pub uri: CharArray<100>,
10079}
10080impl COMPONENT_METADATA_DATA {
10081    pub const ENCODED_LEN: usize = 108usize;
10082    pub const DEFAULT: Self = Self {
10083        time_boot_ms: 0_u32,
10084        file_crc: 0_u32,
10085        uri: CharArray::new([0_u8; 100usize]),
10086    };
10087    #[cfg(feature = "arbitrary")]
10088    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10089        use arbitrary::{Arbitrary, Unstructured};
10090        let mut buf = [0u8; 1024];
10091        rng.fill_bytes(&mut buf);
10092        let mut unstructured = Unstructured::new(&buf);
10093        Self::arbitrary(&mut unstructured).unwrap_or_default()
10094    }
10095}
10096impl Default for COMPONENT_METADATA_DATA {
10097    fn default() -> Self {
10098        Self::DEFAULT.clone()
10099    }
10100}
10101impl MessageData for COMPONENT_METADATA_DATA {
10102    type Message = MavMessage;
10103    const ID: u32 = 397u32;
10104    const NAME: &'static str = "COMPONENT_METADATA";
10105    const EXTRA_CRC: u8 = 182u8;
10106    const ENCODED_LEN: usize = 108usize;
10107    fn deser(
10108        _version: MavlinkVersion,
10109        __input: &[u8],
10110    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10111        let avail_len = __input.len();
10112        let mut payload_buf = [0; Self::ENCODED_LEN];
10113        let mut buf = if avail_len < Self::ENCODED_LEN {
10114            payload_buf[0..avail_len].copy_from_slice(__input);
10115            Bytes::new(&payload_buf)
10116        } else {
10117            Bytes::new(__input)
10118        };
10119        let mut __struct = Self::default();
10120        __struct.time_boot_ms = buf.get_u32_le()?;
10121        __struct.file_crc = buf.get_u32_le()?;
10122        let mut tmp = [0_u8; 100usize];
10123        for v in &mut tmp {
10124            *v = buf.get_u8()?;
10125        }
10126        __struct.uri = CharArray::new(tmp);
10127        Ok(__struct)
10128    }
10129    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10130        let mut __tmp = BytesMut::new(bytes);
10131        #[allow(clippy::absurd_extreme_comparisons)]
10132        #[allow(unused_comparisons)]
10133        if __tmp.remaining() < Self::ENCODED_LEN {
10134            panic!(
10135                "buffer is too small (need {} bytes, but got {})",
10136                Self::ENCODED_LEN,
10137                __tmp.remaining(),
10138            )
10139        }
10140        __tmp.put_u32_le(self.time_boot_ms);
10141        __tmp.put_u32_le(self.file_crc);
10142        for val in &self.uri {
10143            __tmp.put_u8(*val);
10144        }
10145        if matches!(version, MavlinkVersion::V2) {
10146            let len = __tmp.len();
10147            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10148        } else {
10149            __tmp.len()
10150        }
10151    }
10152}
10153#[doc = "Information about GCS in control of this MAV. This should be broadcast at low rate (nominally 1 Hz) and emitted when ownership or takeover status change. Control over MAV is requested using MAV_CMD_REQUEST_OPERATOR_CONTROL."]
10154#[doc = ""]
10155#[doc = "ID: 512"]
10156#[derive(Debug, Clone, PartialEq)]
10157#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10158#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10159#[cfg_attr(feature = "ts", derive(TS))]
10160#[cfg_attr(feature = "ts", ts(export))]
10161pub struct CONTROL_STATUS_DATA {
10162    #[doc = "System ID of GCS MAVLink component in control (0: no GCS in control)."]
10163    pub sysid_in_control: u8,
10164    #[doc = "Control status. For example, whether takeover is allowed, and whether this message instance defines the default controlling GCS for the whole system."]
10165    pub flags: GcsControlStatusFlags,
10166}
10167impl CONTROL_STATUS_DATA {
10168    pub const ENCODED_LEN: usize = 2usize;
10169    pub const DEFAULT: Self = Self {
10170        sysid_in_control: 0_u8,
10171        flags: GcsControlStatusFlags::DEFAULT,
10172    };
10173    #[cfg(feature = "arbitrary")]
10174    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10175        use arbitrary::{Arbitrary, Unstructured};
10176        let mut buf = [0u8; 1024];
10177        rng.fill_bytes(&mut buf);
10178        let mut unstructured = Unstructured::new(&buf);
10179        Self::arbitrary(&mut unstructured).unwrap_or_default()
10180    }
10181}
10182impl Default for CONTROL_STATUS_DATA {
10183    fn default() -> Self {
10184        Self::DEFAULT.clone()
10185    }
10186}
10187impl MessageData for CONTROL_STATUS_DATA {
10188    type Message = MavMessage;
10189    const ID: u32 = 512u32;
10190    const NAME: &'static str = "CONTROL_STATUS";
10191    const EXTRA_CRC: u8 = 184u8;
10192    const ENCODED_LEN: usize = 2usize;
10193    fn deser(
10194        _version: MavlinkVersion,
10195        __input: &[u8],
10196    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10197        let avail_len = __input.len();
10198        let mut payload_buf = [0; Self::ENCODED_LEN];
10199        let mut buf = if avail_len < Self::ENCODED_LEN {
10200            payload_buf[0..avail_len].copy_from_slice(__input);
10201            Bytes::new(&payload_buf)
10202        } else {
10203            Bytes::new(__input)
10204        };
10205        let mut __struct = Self::default();
10206        __struct.sysid_in_control = buf.get_u8()?;
10207        let tmp = buf.get_u8()?;
10208        __struct.flags = GcsControlStatusFlags::from_bits(
10209            tmp as <GcsControlStatusFlags as Flags>::Bits,
10210        )
10211        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
10212            flag_type: "GcsControlStatusFlags",
10213            value: tmp as u64,
10214        })?;
10215        Ok(__struct)
10216    }
10217    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10218        let mut __tmp = BytesMut::new(bytes);
10219        #[allow(clippy::absurd_extreme_comparisons)]
10220        #[allow(unused_comparisons)]
10221        if __tmp.remaining() < Self::ENCODED_LEN {
10222            panic!(
10223                "buffer is too small (need {} bytes, but got {})",
10224                Self::ENCODED_LEN,
10225                __tmp.remaining(),
10226            )
10227        }
10228        __tmp.put_u8(self.sysid_in_control);
10229        __tmp.put_u8(self.flags.bits() as u8);
10230        if matches!(version, MavlinkVersion::V2) {
10231            let len = __tmp.len();
10232            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10233        } else {
10234            __tmp.len()
10235        }
10236    }
10237}
10238#[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
10239#[doc = ""]
10240#[doc = "ID: 146"]
10241#[derive(Debug, Clone, PartialEq)]
10242#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10243#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10244#[cfg_attr(feature = "ts", derive(TS))]
10245#[cfg_attr(feature = "ts", ts(export))]
10246pub struct CONTROL_SYSTEM_STATE_DATA {
10247    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10248    pub time_usec: u64,
10249    #[doc = "X acceleration in body frame"]
10250    pub x_acc: f32,
10251    #[doc = "Y acceleration in body frame"]
10252    pub y_acc: f32,
10253    #[doc = "Z acceleration in body frame"]
10254    pub z_acc: f32,
10255    #[doc = "X velocity in body frame"]
10256    pub x_vel: f32,
10257    #[doc = "Y velocity in body frame"]
10258    pub y_vel: f32,
10259    #[doc = "Z velocity in body frame"]
10260    pub z_vel: f32,
10261    #[doc = "X position in local frame"]
10262    pub x_pos: f32,
10263    #[doc = "Y position in local frame"]
10264    pub y_pos: f32,
10265    #[doc = "Z position in local frame"]
10266    pub z_pos: f32,
10267    #[doc = "Airspeed, set to -1 if unknown"]
10268    pub airspeed: f32,
10269    #[doc = "Variance of body velocity estimate"]
10270    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10271    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10272    pub vel_variance: [f32; 3],
10273    #[doc = "Variance in local position"]
10274    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10275    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10276    pub pos_variance: [f32; 3],
10277    #[doc = "The attitude, represented as Quaternion"]
10278    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10279    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10280    pub q: [f32; 4],
10281    #[doc = "Angular rate in roll axis"]
10282    pub roll_rate: f32,
10283    #[doc = "Angular rate in pitch axis"]
10284    pub pitch_rate: f32,
10285    #[doc = "Angular rate in yaw axis"]
10286    pub yaw_rate: f32,
10287}
10288impl CONTROL_SYSTEM_STATE_DATA {
10289    pub const ENCODED_LEN: usize = 100usize;
10290    pub const DEFAULT: Self = Self {
10291        time_usec: 0_u64,
10292        x_acc: 0.0_f32,
10293        y_acc: 0.0_f32,
10294        z_acc: 0.0_f32,
10295        x_vel: 0.0_f32,
10296        y_vel: 0.0_f32,
10297        z_vel: 0.0_f32,
10298        x_pos: 0.0_f32,
10299        y_pos: 0.0_f32,
10300        z_pos: 0.0_f32,
10301        airspeed: 0.0_f32,
10302        vel_variance: [0.0_f32; 3usize],
10303        pos_variance: [0.0_f32; 3usize],
10304        q: [0.0_f32; 4usize],
10305        roll_rate: 0.0_f32,
10306        pitch_rate: 0.0_f32,
10307        yaw_rate: 0.0_f32,
10308    };
10309    #[cfg(feature = "arbitrary")]
10310    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10311        use arbitrary::{Arbitrary, Unstructured};
10312        let mut buf = [0u8; 1024];
10313        rng.fill_bytes(&mut buf);
10314        let mut unstructured = Unstructured::new(&buf);
10315        Self::arbitrary(&mut unstructured).unwrap_or_default()
10316    }
10317}
10318impl Default for CONTROL_SYSTEM_STATE_DATA {
10319    fn default() -> Self {
10320        Self::DEFAULT.clone()
10321    }
10322}
10323impl MessageData for CONTROL_SYSTEM_STATE_DATA {
10324    type Message = MavMessage;
10325    const ID: u32 = 146u32;
10326    const NAME: &'static str = "CONTROL_SYSTEM_STATE";
10327    const EXTRA_CRC: u8 = 103u8;
10328    const ENCODED_LEN: usize = 100usize;
10329    fn deser(
10330        _version: MavlinkVersion,
10331        __input: &[u8],
10332    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10333        let avail_len = __input.len();
10334        let mut payload_buf = [0; Self::ENCODED_LEN];
10335        let mut buf = if avail_len < Self::ENCODED_LEN {
10336            payload_buf[0..avail_len].copy_from_slice(__input);
10337            Bytes::new(&payload_buf)
10338        } else {
10339            Bytes::new(__input)
10340        };
10341        let mut __struct = Self::default();
10342        __struct.time_usec = buf.get_u64_le()?;
10343        __struct.x_acc = buf.get_f32_le()?;
10344        __struct.y_acc = buf.get_f32_le()?;
10345        __struct.z_acc = buf.get_f32_le()?;
10346        __struct.x_vel = buf.get_f32_le()?;
10347        __struct.y_vel = buf.get_f32_le()?;
10348        __struct.z_vel = buf.get_f32_le()?;
10349        __struct.x_pos = buf.get_f32_le()?;
10350        __struct.y_pos = buf.get_f32_le()?;
10351        __struct.z_pos = buf.get_f32_le()?;
10352        __struct.airspeed = buf.get_f32_le()?;
10353        for v in &mut __struct.vel_variance {
10354            let val = buf.get_f32_le()?;
10355            *v = val;
10356        }
10357        for v in &mut __struct.pos_variance {
10358            let val = buf.get_f32_le()?;
10359            *v = val;
10360        }
10361        for v in &mut __struct.q {
10362            let val = buf.get_f32_le()?;
10363            *v = val;
10364        }
10365        __struct.roll_rate = buf.get_f32_le()?;
10366        __struct.pitch_rate = buf.get_f32_le()?;
10367        __struct.yaw_rate = buf.get_f32_le()?;
10368        Ok(__struct)
10369    }
10370    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10371        let mut __tmp = BytesMut::new(bytes);
10372        #[allow(clippy::absurd_extreme_comparisons)]
10373        #[allow(unused_comparisons)]
10374        if __tmp.remaining() < Self::ENCODED_LEN {
10375            panic!(
10376                "buffer is too small (need {} bytes, but got {})",
10377                Self::ENCODED_LEN,
10378                __tmp.remaining(),
10379            )
10380        }
10381        __tmp.put_u64_le(self.time_usec);
10382        __tmp.put_f32_le(self.x_acc);
10383        __tmp.put_f32_le(self.y_acc);
10384        __tmp.put_f32_le(self.z_acc);
10385        __tmp.put_f32_le(self.x_vel);
10386        __tmp.put_f32_le(self.y_vel);
10387        __tmp.put_f32_le(self.z_vel);
10388        __tmp.put_f32_le(self.x_pos);
10389        __tmp.put_f32_le(self.y_pos);
10390        __tmp.put_f32_le(self.z_pos);
10391        __tmp.put_f32_le(self.airspeed);
10392        for val in &self.vel_variance {
10393            __tmp.put_f32_le(*val);
10394        }
10395        for val in &self.pos_variance {
10396            __tmp.put_f32_le(*val);
10397        }
10398        for val in &self.q {
10399            __tmp.put_f32_le(*val);
10400        }
10401        __tmp.put_f32_le(self.roll_rate);
10402        __tmp.put_f32_le(self.pitch_rate);
10403        __tmp.put_f32_le(self.yaw_rate);
10404        if matches!(version, MavlinkVersion::V2) {
10405            let len = __tmp.len();
10406            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10407        } else {
10408            __tmp.len()
10409        }
10410    }
10411}
10412#[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
10413#[doc = ""]
10414#[doc = "ID: 411"]
10415#[derive(Debug, Clone, PartialEq)]
10416#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10417#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10418#[cfg_attr(feature = "ts", derive(TS))]
10419#[cfg_attr(feature = "ts", ts(export))]
10420pub struct CURRENT_EVENT_SEQUENCE_DATA {
10421    #[doc = "Sequence number."]
10422    pub sequence: u16,
10423    #[doc = "Flag bitset."]
10424    pub flags: MavEventCurrentSequenceFlags,
10425}
10426impl CURRENT_EVENT_SEQUENCE_DATA {
10427    pub const ENCODED_LEN: usize = 3usize;
10428    pub const DEFAULT: Self = Self {
10429        sequence: 0_u16,
10430        flags: MavEventCurrentSequenceFlags::DEFAULT,
10431    };
10432    #[cfg(feature = "arbitrary")]
10433    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10434        use arbitrary::{Arbitrary, Unstructured};
10435        let mut buf = [0u8; 1024];
10436        rng.fill_bytes(&mut buf);
10437        let mut unstructured = Unstructured::new(&buf);
10438        Self::arbitrary(&mut unstructured).unwrap_or_default()
10439    }
10440}
10441impl Default for CURRENT_EVENT_SEQUENCE_DATA {
10442    fn default() -> Self {
10443        Self::DEFAULT.clone()
10444    }
10445}
10446impl MessageData for CURRENT_EVENT_SEQUENCE_DATA {
10447    type Message = MavMessage;
10448    const ID: u32 = 411u32;
10449    const NAME: &'static str = "CURRENT_EVENT_SEQUENCE";
10450    const EXTRA_CRC: u8 = 106u8;
10451    const ENCODED_LEN: usize = 3usize;
10452    fn deser(
10453        _version: MavlinkVersion,
10454        __input: &[u8],
10455    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10456        let avail_len = __input.len();
10457        let mut payload_buf = [0; Self::ENCODED_LEN];
10458        let mut buf = if avail_len < Self::ENCODED_LEN {
10459            payload_buf[0..avail_len].copy_from_slice(__input);
10460            Bytes::new(&payload_buf)
10461        } else {
10462            Bytes::new(__input)
10463        };
10464        let mut __struct = Self::default();
10465        __struct.sequence = buf.get_u16_le()?;
10466        let tmp = buf.get_u8()?;
10467        __struct.flags =
10468            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10469                enum_type: "MavEventCurrentSequenceFlags",
10470                value: tmp as u64,
10471            })?;
10472        Ok(__struct)
10473    }
10474    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10475        let mut __tmp = BytesMut::new(bytes);
10476        #[allow(clippy::absurd_extreme_comparisons)]
10477        #[allow(unused_comparisons)]
10478        if __tmp.remaining() < Self::ENCODED_LEN {
10479            panic!(
10480                "buffer is too small (need {} bytes, but got {})",
10481                Self::ENCODED_LEN,
10482                __tmp.remaining(),
10483            )
10484        }
10485        __tmp.put_u16_le(self.sequence);
10486        __tmp.put_u8(self.flags as u8);
10487        if matches!(version, MavlinkVersion::V2) {
10488            let len = __tmp.len();
10489            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10490        } else {
10491            __tmp.len()
10492        }
10493    }
10494}
10495#[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
10496#[doc = ""]
10497#[doc = "ID: 436"]
10498#[derive(Debug, Clone, PartialEq)]
10499#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10500#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10501#[cfg_attr(feature = "ts", derive(TS))]
10502#[cfg_attr(feature = "ts", ts(export))]
10503pub struct CURRENT_MODE_DATA {
10504    #[doc = "A bitfield for use for autopilot-specific flags"]
10505    pub custom_mode: u32,
10506    #[doc = "The custom_mode of the mode that was last commanded by the user (for example, with MAV_CMD_DO_SET_STANDARD_MODE, MAV_CMD_DO_SET_MODE or via RC). This should usually be the same as custom_mode. It will be different if the vehicle is unable to enter the intended mode, or has left that mode due to a failsafe condition. 0 indicates the intended custom mode is unknown/not supplied"]
10507    pub intended_custom_mode: u32,
10508    #[doc = "Standard mode."]
10509    pub standard_mode: MavStandardMode,
10510}
10511impl CURRENT_MODE_DATA {
10512    pub const ENCODED_LEN: usize = 9usize;
10513    pub const DEFAULT: Self = Self {
10514        custom_mode: 0_u32,
10515        intended_custom_mode: 0_u32,
10516        standard_mode: MavStandardMode::DEFAULT,
10517    };
10518    #[cfg(feature = "arbitrary")]
10519    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10520        use arbitrary::{Arbitrary, Unstructured};
10521        let mut buf = [0u8; 1024];
10522        rng.fill_bytes(&mut buf);
10523        let mut unstructured = Unstructured::new(&buf);
10524        Self::arbitrary(&mut unstructured).unwrap_or_default()
10525    }
10526}
10527impl Default for CURRENT_MODE_DATA {
10528    fn default() -> Self {
10529        Self::DEFAULT.clone()
10530    }
10531}
10532impl MessageData for CURRENT_MODE_DATA {
10533    type Message = MavMessage;
10534    const ID: u32 = 436u32;
10535    const NAME: &'static str = "CURRENT_MODE";
10536    const EXTRA_CRC: u8 = 193u8;
10537    const ENCODED_LEN: usize = 9usize;
10538    fn deser(
10539        _version: MavlinkVersion,
10540        __input: &[u8],
10541    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10542        let avail_len = __input.len();
10543        let mut payload_buf = [0; Self::ENCODED_LEN];
10544        let mut buf = if avail_len < Self::ENCODED_LEN {
10545            payload_buf[0..avail_len].copy_from_slice(__input);
10546            Bytes::new(&payload_buf)
10547        } else {
10548            Bytes::new(__input)
10549        };
10550        let mut __struct = Self::default();
10551        __struct.custom_mode = buf.get_u32_le()?;
10552        __struct.intended_custom_mode = buf.get_u32_le()?;
10553        let tmp = buf.get_u8()?;
10554        __struct.standard_mode =
10555            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10556                enum_type: "MavStandardMode",
10557                value: tmp as u64,
10558            })?;
10559        Ok(__struct)
10560    }
10561    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10562        let mut __tmp = BytesMut::new(bytes);
10563        #[allow(clippy::absurd_extreme_comparisons)]
10564        #[allow(unused_comparisons)]
10565        if __tmp.remaining() < Self::ENCODED_LEN {
10566            panic!(
10567                "buffer is too small (need {} bytes, but got {})",
10568                Self::ENCODED_LEN,
10569                __tmp.remaining(),
10570            )
10571        }
10572        __tmp.put_u32_le(self.custom_mode);
10573        __tmp.put_u32_le(self.intended_custom_mode);
10574        __tmp.put_u8(self.standard_mode as u8);
10575        if matches!(version, MavlinkVersion::V2) {
10576            let len = __tmp.len();
10577            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10578        } else {
10579            __tmp.len()
10580        }
10581    }
10582}
10583#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
10584#[doc = "Data stream status information."]
10585#[doc = ""]
10586#[doc = "ID: 67"]
10587#[derive(Debug, Clone, PartialEq)]
10588#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10589#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10590#[cfg_attr(feature = "ts", derive(TS))]
10591#[cfg_attr(feature = "ts", ts(export))]
10592pub struct DATA_STREAM_DATA {
10593    #[doc = "The message rate"]
10594    pub message_rate: u16,
10595    #[doc = "The ID of the requested data stream"]
10596    pub stream_id: u8,
10597    #[doc = "1 stream is enabled, 0 stream is stopped."]
10598    pub on_off: u8,
10599}
10600impl DATA_STREAM_DATA {
10601    pub const ENCODED_LEN: usize = 4usize;
10602    pub const DEFAULT: Self = Self {
10603        message_rate: 0_u16,
10604        stream_id: 0_u8,
10605        on_off: 0_u8,
10606    };
10607    #[cfg(feature = "arbitrary")]
10608    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10609        use arbitrary::{Arbitrary, Unstructured};
10610        let mut buf = [0u8; 1024];
10611        rng.fill_bytes(&mut buf);
10612        let mut unstructured = Unstructured::new(&buf);
10613        Self::arbitrary(&mut unstructured).unwrap_or_default()
10614    }
10615}
10616impl Default for DATA_STREAM_DATA {
10617    fn default() -> Self {
10618        Self::DEFAULT.clone()
10619    }
10620}
10621impl MessageData for DATA_STREAM_DATA {
10622    type Message = MavMessage;
10623    const ID: u32 = 67u32;
10624    const NAME: &'static str = "DATA_STREAM";
10625    const EXTRA_CRC: u8 = 21u8;
10626    const ENCODED_LEN: usize = 4usize;
10627    fn deser(
10628        _version: MavlinkVersion,
10629        __input: &[u8],
10630    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10631        let avail_len = __input.len();
10632        let mut payload_buf = [0; Self::ENCODED_LEN];
10633        let mut buf = if avail_len < Self::ENCODED_LEN {
10634            payload_buf[0..avail_len].copy_from_slice(__input);
10635            Bytes::new(&payload_buf)
10636        } else {
10637            Bytes::new(__input)
10638        };
10639        let mut __struct = Self::default();
10640        __struct.message_rate = buf.get_u16_le()?;
10641        __struct.stream_id = buf.get_u8()?;
10642        __struct.on_off = buf.get_u8()?;
10643        Ok(__struct)
10644    }
10645    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10646        let mut __tmp = BytesMut::new(bytes);
10647        #[allow(clippy::absurd_extreme_comparisons)]
10648        #[allow(unused_comparisons)]
10649        if __tmp.remaining() < Self::ENCODED_LEN {
10650            panic!(
10651                "buffer is too small (need {} bytes, but got {})",
10652                Self::ENCODED_LEN,
10653                __tmp.remaining(),
10654            )
10655        }
10656        __tmp.put_u16_le(self.message_rate);
10657        __tmp.put_u8(self.stream_id);
10658        __tmp.put_u8(self.on_off);
10659        if matches!(version, MavlinkVersion::V2) {
10660            let len = __tmp.len();
10661            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10662        } else {
10663            __tmp.len()
10664        }
10665    }
10666}
10667#[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
10668#[doc = ""]
10669#[doc = "ID: 130"]
10670#[derive(Debug, Clone, PartialEq)]
10671#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10672#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10673#[cfg_attr(feature = "ts", derive(TS))]
10674#[cfg_attr(feature = "ts", ts(export))]
10675pub struct DATA_TRANSMISSION_HANDSHAKE_DATA {
10676    #[doc = "total data size (set on ACK only)."]
10677    pub size: u32,
10678    #[doc = "Width of a matrix or image."]
10679    pub width: u16,
10680    #[doc = "Height of a matrix or image."]
10681    pub height: u16,
10682    #[doc = "Number of packets being sent (set on ACK only)."]
10683    pub packets: u16,
10684    #[doc = "Type of requested/acknowledged data."]
10685    pub mavtype: MavlinkDataStreamType,
10686    #[doc = "Payload size per packet (normally 253 byte, see DATA field size in message ENCAPSULATED_DATA) (set on ACK only)."]
10687    pub payload: u8,
10688    #[doc = "JPEG quality. Values: [1-100]."]
10689    pub jpg_quality: u8,
10690}
10691impl DATA_TRANSMISSION_HANDSHAKE_DATA {
10692    pub const ENCODED_LEN: usize = 13usize;
10693    pub const DEFAULT: Self = Self {
10694        size: 0_u32,
10695        width: 0_u16,
10696        height: 0_u16,
10697        packets: 0_u16,
10698        mavtype: MavlinkDataStreamType::DEFAULT,
10699        payload: 0_u8,
10700        jpg_quality: 0_u8,
10701    };
10702    #[cfg(feature = "arbitrary")]
10703    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10704        use arbitrary::{Arbitrary, Unstructured};
10705        let mut buf = [0u8; 1024];
10706        rng.fill_bytes(&mut buf);
10707        let mut unstructured = Unstructured::new(&buf);
10708        Self::arbitrary(&mut unstructured).unwrap_or_default()
10709    }
10710}
10711impl Default for DATA_TRANSMISSION_HANDSHAKE_DATA {
10712    fn default() -> Self {
10713        Self::DEFAULT.clone()
10714    }
10715}
10716impl MessageData for DATA_TRANSMISSION_HANDSHAKE_DATA {
10717    type Message = MavMessage;
10718    const ID: u32 = 130u32;
10719    const NAME: &'static str = "DATA_TRANSMISSION_HANDSHAKE";
10720    const EXTRA_CRC: u8 = 29u8;
10721    const ENCODED_LEN: usize = 13usize;
10722    fn deser(
10723        _version: MavlinkVersion,
10724        __input: &[u8],
10725    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10726        let avail_len = __input.len();
10727        let mut payload_buf = [0; Self::ENCODED_LEN];
10728        let mut buf = if avail_len < Self::ENCODED_LEN {
10729            payload_buf[0..avail_len].copy_from_slice(__input);
10730            Bytes::new(&payload_buf)
10731        } else {
10732            Bytes::new(__input)
10733        };
10734        let mut __struct = Self::default();
10735        __struct.size = buf.get_u32_le()?;
10736        __struct.width = buf.get_u16_le()?;
10737        __struct.height = buf.get_u16_le()?;
10738        __struct.packets = buf.get_u16_le()?;
10739        let tmp = buf.get_u8()?;
10740        __struct.mavtype =
10741            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10742                enum_type: "MavlinkDataStreamType",
10743                value: tmp as u64,
10744            })?;
10745        __struct.payload = buf.get_u8()?;
10746        __struct.jpg_quality = buf.get_u8()?;
10747        Ok(__struct)
10748    }
10749    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10750        let mut __tmp = BytesMut::new(bytes);
10751        #[allow(clippy::absurd_extreme_comparisons)]
10752        #[allow(unused_comparisons)]
10753        if __tmp.remaining() < Self::ENCODED_LEN {
10754            panic!(
10755                "buffer is too small (need {} bytes, but got {})",
10756                Self::ENCODED_LEN,
10757                __tmp.remaining(),
10758            )
10759        }
10760        __tmp.put_u32_le(self.size);
10761        __tmp.put_u16_le(self.width);
10762        __tmp.put_u16_le(self.height);
10763        __tmp.put_u16_le(self.packets);
10764        __tmp.put_u8(self.mavtype as u8);
10765        __tmp.put_u8(self.payload);
10766        __tmp.put_u8(self.jpg_quality);
10767        if matches!(version, MavlinkVersion::V2) {
10768            let len = __tmp.len();
10769            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10770        } else {
10771            __tmp.len()
10772        }
10773    }
10774}
10775#[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
10776#[doc = ""]
10777#[doc = "ID: 254"]
10778#[derive(Debug, Clone, PartialEq)]
10779#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10780#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10781#[cfg_attr(feature = "ts", derive(TS))]
10782#[cfg_attr(feature = "ts", ts(export))]
10783pub struct DEBUG_DATA {
10784    #[doc = "Timestamp (time since system boot)."]
10785    pub time_boot_ms: u32,
10786    #[doc = "DEBUG value"]
10787    pub value: f32,
10788    #[doc = "index of debug variable"]
10789    pub ind: u8,
10790}
10791impl DEBUG_DATA {
10792    pub const ENCODED_LEN: usize = 9usize;
10793    pub const DEFAULT: Self = Self {
10794        time_boot_ms: 0_u32,
10795        value: 0.0_f32,
10796        ind: 0_u8,
10797    };
10798    #[cfg(feature = "arbitrary")]
10799    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10800        use arbitrary::{Arbitrary, Unstructured};
10801        let mut buf = [0u8; 1024];
10802        rng.fill_bytes(&mut buf);
10803        let mut unstructured = Unstructured::new(&buf);
10804        Self::arbitrary(&mut unstructured).unwrap_or_default()
10805    }
10806}
10807impl Default for DEBUG_DATA {
10808    fn default() -> Self {
10809        Self::DEFAULT.clone()
10810    }
10811}
10812impl MessageData for DEBUG_DATA {
10813    type Message = MavMessage;
10814    const ID: u32 = 254u32;
10815    const NAME: &'static str = "DEBUG";
10816    const EXTRA_CRC: u8 = 46u8;
10817    const ENCODED_LEN: usize = 9usize;
10818    fn deser(
10819        _version: MavlinkVersion,
10820        __input: &[u8],
10821    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10822        let avail_len = __input.len();
10823        let mut payload_buf = [0; Self::ENCODED_LEN];
10824        let mut buf = if avail_len < Self::ENCODED_LEN {
10825            payload_buf[0..avail_len].copy_from_slice(__input);
10826            Bytes::new(&payload_buf)
10827        } else {
10828            Bytes::new(__input)
10829        };
10830        let mut __struct = Self::default();
10831        __struct.time_boot_ms = buf.get_u32_le()?;
10832        __struct.value = buf.get_f32_le()?;
10833        __struct.ind = buf.get_u8()?;
10834        Ok(__struct)
10835    }
10836    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10837        let mut __tmp = BytesMut::new(bytes);
10838        #[allow(clippy::absurd_extreme_comparisons)]
10839        #[allow(unused_comparisons)]
10840        if __tmp.remaining() < Self::ENCODED_LEN {
10841            panic!(
10842                "buffer is too small (need {} bytes, but got {})",
10843                Self::ENCODED_LEN,
10844                __tmp.remaining(),
10845            )
10846        }
10847        __tmp.put_u32_le(self.time_boot_ms);
10848        __tmp.put_f32_le(self.value);
10849        __tmp.put_u8(self.ind);
10850        if matches!(version, MavlinkVersion::V2) {
10851            let len = __tmp.len();
10852            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10853        } else {
10854            __tmp.len()
10855        }
10856    }
10857}
10858#[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
10859#[doc = ""]
10860#[doc = "ID: 350"]
10861#[derive(Debug, Clone, PartialEq)]
10862#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10863#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10864#[cfg_attr(feature = "ts", derive(TS))]
10865#[cfg_attr(feature = "ts", ts(export))]
10866pub struct DEBUG_FLOAT_ARRAY_DATA {
10867    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10868    pub time_usec: u64,
10869    #[doc = "Unique ID used to discriminate between arrays"]
10870    pub array_id: u16,
10871    #[doc = "Name, for human-friendly display in a Ground Control Station"]
10872    #[cfg_attr(feature = "ts", ts(type = "string"))]
10873    pub name: CharArray<10>,
10874    #[doc = "data"]
10875    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10876    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10877    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
10878    pub data: [f32; 58],
10879}
10880impl DEBUG_FLOAT_ARRAY_DATA {
10881    pub const ENCODED_LEN: usize = 252usize;
10882    pub const DEFAULT: Self = Self {
10883        time_usec: 0_u64,
10884        array_id: 0_u16,
10885        name: CharArray::new([0_u8; 10usize]),
10886        data: [0.0_f32; 58usize],
10887    };
10888    #[cfg(feature = "arbitrary")]
10889    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10890        use arbitrary::{Arbitrary, Unstructured};
10891        let mut buf = [0u8; 1024];
10892        rng.fill_bytes(&mut buf);
10893        let mut unstructured = Unstructured::new(&buf);
10894        Self::arbitrary(&mut unstructured).unwrap_or_default()
10895    }
10896}
10897impl Default for DEBUG_FLOAT_ARRAY_DATA {
10898    fn default() -> Self {
10899        Self::DEFAULT.clone()
10900    }
10901}
10902impl MessageData for DEBUG_FLOAT_ARRAY_DATA {
10903    type Message = MavMessage;
10904    const ID: u32 = 350u32;
10905    const NAME: &'static str = "DEBUG_FLOAT_ARRAY";
10906    const EXTRA_CRC: u8 = 232u8;
10907    const ENCODED_LEN: usize = 252usize;
10908    fn deser(
10909        _version: MavlinkVersion,
10910        __input: &[u8],
10911    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10912        let avail_len = __input.len();
10913        let mut payload_buf = [0; Self::ENCODED_LEN];
10914        let mut buf = if avail_len < Self::ENCODED_LEN {
10915            payload_buf[0..avail_len].copy_from_slice(__input);
10916            Bytes::new(&payload_buf)
10917        } else {
10918            Bytes::new(__input)
10919        };
10920        let mut __struct = Self::default();
10921        __struct.time_usec = buf.get_u64_le()?;
10922        __struct.array_id = buf.get_u16_le()?;
10923        let mut tmp = [0_u8; 10usize];
10924        for v in &mut tmp {
10925            *v = buf.get_u8()?;
10926        }
10927        __struct.name = CharArray::new(tmp);
10928        for v in &mut __struct.data {
10929            let val = buf.get_f32_le()?;
10930            *v = val;
10931        }
10932        Ok(__struct)
10933    }
10934    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10935        let mut __tmp = BytesMut::new(bytes);
10936        #[allow(clippy::absurd_extreme_comparisons)]
10937        #[allow(unused_comparisons)]
10938        if __tmp.remaining() < Self::ENCODED_LEN {
10939            panic!(
10940                "buffer is too small (need {} bytes, but got {})",
10941                Self::ENCODED_LEN,
10942                __tmp.remaining(),
10943            )
10944        }
10945        __tmp.put_u64_le(self.time_usec);
10946        __tmp.put_u16_le(self.array_id);
10947        for val in &self.name {
10948            __tmp.put_u8(*val);
10949        }
10950        if matches!(version, MavlinkVersion::V2) {
10951            for val in &self.data {
10952                __tmp.put_f32_le(*val);
10953            }
10954            let len = __tmp.len();
10955            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10956        } else {
10957            __tmp.len()
10958        }
10959    }
10960}
10961#[doc = "To debug something using a named 3D vector."]
10962#[doc = ""]
10963#[doc = "ID: 250"]
10964#[derive(Debug, Clone, PartialEq)]
10965#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10966#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10967#[cfg_attr(feature = "ts", derive(TS))]
10968#[cfg_attr(feature = "ts", ts(export))]
10969pub struct DEBUG_VECT_DATA {
10970    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10971    pub time_usec: u64,
10972    #[doc = "x"]
10973    pub x: f32,
10974    #[doc = "y"]
10975    pub y: f32,
10976    #[doc = "z"]
10977    pub z: f32,
10978    #[doc = "Name"]
10979    #[cfg_attr(feature = "ts", ts(type = "string"))]
10980    pub name: CharArray<10>,
10981}
10982impl DEBUG_VECT_DATA {
10983    pub const ENCODED_LEN: usize = 30usize;
10984    pub const DEFAULT: Self = Self {
10985        time_usec: 0_u64,
10986        x: 0.0_f32,
10987        y: 0.0_f32,
10988        z: 0.0_f32,
10989        name: CharArray::new([0_u8; 10usize]),
10990    };
10991    #[cfg(feature = "arbitrary")]
10992    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10993        use arbitrary::{Arbitrary, Unstructured};
10994        let mut buf = [0u8; 1024];
10995        rng.fill_bytes(&mut buf);
10996        let mut unstructured = Unstructured::new(&buf);
10997        Self::arbitrary(&mut unstructured).unwrap_or_default()
10998    }
10999}
11000impl Default for DEBUG_VECT_DATA {
11001    fn default() -> Self {
11002        Self::DEFAULT.clone()
11003    }
11004}
11005impl MessageData for DEBUG_VECT_DATA {
11006    type Message = MavMessage;
11007    const ID: u32 = 250u32;
11008    const NAME: &'static str = "DEBUG_VECT";
11009    const EXTRA_CRC: u8 = 49u8;
11010    const ENCODED_LEN: usize = 30usize;
11011    fn deser(
11012        _version: MavlinkVersion,
11013        __input: &[u8],
11014    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11015        let avail_len = __input.len();
11016        let mut payload_buf = [0; Self::ENCODED_LEN];
11017        let mut buf = if avail_len < Self::ENCODED_LEN {
11018            payload_buf[0..avail_len].copy_from_slice(__input);
11019            Bytes::new(&payload_buf)
11020        } else {
11021            Bytes::new(__input)
11022        };
11023        let mut __struct = Self::default();
11024        __struct.time_usec = buf.get_u64_le()?;
11025        __struct.x = buf.get_f32_le()?;
11026        __struct.y = buf.get_f32_le()?;
11027        __struct.z = buf.get_f32_le()?;
11028        let mut tmp = [0_u8; 10usize];
11029        for v in &mut tmp {
11030            *v = buf.get_u8()?;
11031        }
11032        __struct.name = CharArray::new(tmp);
11033        Ok(__struct)
11034    }
11035    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11036        let mut __tmp = BytesMut::new(bytes);
11037        #[allow(clippy::absurd_extreme_comparisons)]
11038        #[allow(unused_comparisons)]
11039        if __tmp.remaining() < Self::ENCODED_LEN {
11040            panic!(
11041                "buffer is too small (need {} bytes, but got {})",
11042                Self::ENCODED_LEN,
11043                __tmp.remaining(),
11044            )
11045        }
11046        __tmp.put_u64_le(self.time_usec);
11047        __tmp.put_f32_le(self.x);
11048        __tmp.put_f32_le(self.y);
11049        __tmp.put_f32_le(self.z);
11050        for val in &self.name {
11051            __tmp.put_u8(*val);
11052        }
11053        if matches!(version, MavlinkVersion::V2) {
11054            let len = __tmp.len();
11055            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11056        } else {
11057            __tmp.len()
11058        }
11059    }
11060}
11061#[doc = "Distance sensor information for an onboard rangefinder."]
11062#[doc = ""]
11063#[doc = "ID: 132"]
11064#[derive(Debug, Clone, PartialEq)]
11065#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11066#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11067#[cfg_attr(feature = "ts", derive(TS))]
11068#[cfg_attr(feature = "ts", ts(export))]
11069pub struct DISTANCE_SENSOR_DATA {
11070    #[doc = "Timestamp (time since system boot)."]
11071    pub time_boot_ms: u32,
11072    #[doc = "Minimum distance the sensor can measure"]
11073    pub min_distance: u16,
11074    #[doc = "Maximum distance the sensor can measure"]
11075    pub max_distance: u16,
11076    #[doc = "Current distance reading"]
11077    pub current_distance: u16,
11078    #[doc = "Type of distance sensor."]
11079    pub mavtype: MavDistanceSensor,
11080    #[doc = "Onboard ID of the sensor"]
11081    pub id: u8,
11082    #[doc = "Direction the sensor faces. downward-facing: ROTATION_PITCH_270, upward-facing: ROTATION_PITCH_90, backward-facing: ROTATION_PITCH_180, forward-facing: ROTATION_NONE, left-facing: ROTATION_YAW_90, right-facing: ROTATION_YAW_270"]
11083    pub orientation: MavSensorOrientation,
11084    #[doc = "Measurement variance. Max standard deviation is 6cm. UINT8_MAX if unknown."]
11085    pub covariance: u8,
11086    #[doc = "Horizontal Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
11087    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11088    pub horizontal_fov: f32,
11089    #[doc = "Vertical Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
11090    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11091    pub vertical_fov: f32,
11092    #[doc = "Quaternion of the sensor orientation in vehicle body frame (w, x, y, z order, zero-rotation is 1, 0, 0, 0). Zero-rotation is along the vehicle body x-axis. This field is required if the orientation is set to MAV_SENSOR_ROTATION_CUSTOM. Set it to 0 if invalid.\""]
11093    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11094    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11095    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11096    pub quaternion: [f32; 4],
11097    #[doc = "Signal quality of the sensor. Specific to each sensor type, representing the relation of the signal strength with the target reflectivity, distance, size or aspect, but normalised as a percentage. 0 = unknown/unset signal quality, 1 = invalid signal, 100 = perfect signal."]
11098    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11099    pub signal_quality: u8,
11100}
11101impl DISTANCE_SENSOR_DATA {
11102    pub const ENCODED_LEN: usize = 39usize;
11103    pub const DEFAULT: Self = Self {
11104        time_boot_ms: 0_u32,
11105        min_distance: 0_u16,
11106        max_distance: 0_u16,
11107        current_distance: 0_u16,
11108        mavtype: MavDistanceSensor::DEFAULT,
11109        id: 0_u8,
11110        orientation: MavSensorOrientation::DEFAULT,
11111        covariance: 0_u8,
11112        horizontal_fov: 0.0_f32,
11113        vertical_fov: 0.0_f32,
11114        quaternion: [0.0_f32; 4usize],
11115        signal_quality: 0_u8,
11116    };
11117    #[cfg(feature = "arbitrary")]
11118    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11119        use arbitrary::{Arbitrary, Unstructured};
11120        let mut buf = [0u8; 1024];
11121        rng.fill_bytes(&mut buf);
11122        let mut unstructured = Unstructured::new(&buf);
11123        Self::arbitrary(&mut unstructured).unwrap_or_default()
11124    }
11125}
11126impl Default for DISTANCE_SENSOR_DATA {
11127    fn default() -> Self {
11128        Self::DEFAULT.clone()
11129    }
11130}
11131impl MessageData for DISTANCE_SENSOR_DATA {
11132    type Message = MavMessage;
11133    const ID: u32 = 132u32;
11134    const NAME: &'static str = "DISTANCE_SENSOR";
11135    const EXTRA_CRC: u8 = 85u8;
11136    const ENCODED_LEN: usize = 39usize;
11137    fn deser(
11138        _version: MavlinkVersion,
11139        __input: &[u8],
11140    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11141        let avail_len = __input.len();
11142        let mut payload_buf = [0; Self::ENCODED_LEN];
11143        let mut buf = if avail_len < Self::ENCODED_LEN {
11144            payload_buf[0..avail_len].copy_from_slice(__input);
11145            Bytes::new(&payload_buf)
11146        } else {
11147            Bytes::new(__input)
11148        };
11149        let mut __struct = Self::default();
11150        __struct.time_boot_ms = buf.get_u32_le()?;
11151        __struct.min_distance = buf.get_u16_le()?;
11152        __struct.max_distance = buf.get_u16_le()?;
11153        __struct.current_distance = buf.get_u16_le()?;
11154        let tmp = buf.get_u8()?;
11155        __struct.mavtype =
11156            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11157                enum_type: "MavDistanceSensor",
11158                value: tmp as u64,
11159            })?;
11160        __struct.id = buf.get_u8()?;
11161        let tmp = buf.get_u8()?;
11162        __struct.orientation =
11163            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11164                enum_type: "MavSensorOrientation",
11165                value: tmp as u64,
11166            })?;
11167        __struct.covariance = buf.get_u8()?;
11168        __struct.horizontal_fov = buf.get_f32_le()?;
11169        __struct.vertical_fov = buf.get_f32_le()?;
11170        for v in &mut __struct.quaternion {
11171            let val = buf.get_f32_le()?;
11172            *v = val;
11173        }
11174        __struct.signal_quality = buf.get_u8()?;
11175        Ok(__struct)
11176    }
11177    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11178        let mut __tmp = BytesMut::new(bytes);
11179        #[allow(clippy::absurd_extreme_comparisons)]
11180        #[allow(unused_comparisons)]
11181        if __tmp.remaining() < Self::ENCODED_LEN {
11182            panic!(
11183                "buffer is too small (need {} bytes, but got {})",
11184                Self::ENCODED_LEN,
11185                __tmp.remaining(),
11186            )
11187        }
11188        __tmp.put_u32_le(self.time_boot_ms);
11189        __tmp.put_u16_le(self.min_distance);
11190        __tmp.put_u16_le(self.max_distance);
11191        __tmp.put_u16_le(self.current_distance);
11192        __tmp.put_u8(self.mavtype as u8);
11193        __tmp.put_u8(self.id);
11194        __tmp.put_u8(self.orientation as u8);
11195        __tmp.put_u8(self.covariance);
11196        if matches!(version, MavlinkVersion::V2) {
11197            __tmp.put_f32_le(self.horizontal_fov);
11198            __tmp.put_f32_le(self.vertical_fov);
11199            for val in &self.quaternion {
11200                __tmp.put_f32_le(*val);
11201            }
11202            __tmp.put_u8(self.signal_quality);
11203            let len = __tmp.len();
11204            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11205        } else {
11206            __tmp.len()
11207        }
11208    }
11209}
11210#[doc = "EFI status output."]
11211#[doc = ""]
11212#[doc = "ID: 225"]
11213#[derive(Debug, Clone, PartialEq)]
11214#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11215#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11216#[cfg_attr(feature = "ts", derive(TS))]
11217#[cfg_attr(feature = "ts", ts(export))]
11218pub struct EFI_STATUS_DATA {
11219    #[doc = "ECU index"]
11220    pub ecu_index: f32,
11221    #[doc = "RPM"]
11222    pub rpm: f32,
11223    #[doc = "Fuel consumed"]
11224    pub fuel_consumed: f32,
11225    #[doc = "Fuel flow rate"]
11226    pub fuel_flow: f32,
11227    #[doc = "Engine load"]
11228    pub engine_load: f32,
11229    #[doc = "Throttle position"]
11230    pub throttle_position: f32,
11231    #[doc = "Spark dwell time"]
11232    pub spark_dwell_time: f32,
11233    #[doc = "Barometric pressure"]
11234    pub barometric_pressure: f32,
11235    #[doc = "Intake manifold pressure("]
11236    pub intake_manifold_pressure: f32,
11237    #[doc = "Intake manifold temperature"]
11238    pub intake_manifold_temperature: f32,
11239    #[doc = "Cylinder head temperature"]
11240    pub cylinder_head_temperature: f32,
11241    #[doc = "Ignition timing (Crank angle degrees)"]
11242    pub ignition_timing: f32,
11243    #[doc = "Injection time"]
11244    pub injection_time: f32,
11245    #[doc = "Exhaust gas temperature"]
11246    pub exhaust_gas_temperature: f32,
11247    #[doc = "Output throttle"]
11248    pub throttle_out: f32,
11249    #[doc = "Pressure/temperature compensation"]
11250    pub pt_compensation: f32,
11251    #[doc = "EFI health status"]
11252    pub health: u8,
11253    #[doc = "Supply voltage to EFI sparking system.  Zero in this value means \"unknown\", so if the supply voltage really is zero volts use 0.0001 instead."]
11254    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11255    pub ignition_voltage: f32,
11256    #[doc = "Fuel pressure. Zero in this value means \"unknown\", so if the fuel pressure really is zero kPa use 0.0001 instead."]
11257    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11258    pub fuel_pressure: f32,
11259}
11260impl EFI_STATUS_DATA {
11261    pub const ENCODED_LEN: usize = 73usize;
11262    pub const DEFAULT: Self = Self {
11263        ecu_index: 0.0_f32,
11264        rpm: 0.0_f32,
11265        fuel_consumed: 0.0_f32,
11266        fuel_flow: 0.0_f32,
11267        engine_load: 0.0_f32,
11268        throttle_position: 0.0_f32,
11269        spark_dwell_time: 0.0_f32,
11270        barometric_pressure: 0.0_f32,
11271        intake_manifold_pressure: 0.0_f32,
11272        intake_manifold_temperature: 0.0_f32,
11273        cylinder_head_temperature: 0.0_f32,
11274        ignition_timing: 0.0_f32,
11275        injection_time: 0.0_f32,
11276        exhaust_gas_temperature: 0.0_f32,
11277        throttle_out: 0.0_f32,
11278        pt_compensation: 0.0_f32,
11279        health: 0_u8,
11280        ignition_voltage: 0.0_f32,
11281        fuel_pressure: 0.0_f32,
11282    };
11283    #[cfg(feature = "arbitrary")]
11284    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11285        use arbitrary::{Arbitrary, Unstructured};
11286        let mut buf = [0u8; 1024];
11287        rng.fill_bytes(&mut buf);
11288        let mut unstructured = Unstructured::new(&buf);
11289        Self::arbitrary(&mut unstructured).unwrap_or_default()
11290    }
11291}
11292impl Default for EFI_STATUS_DATA {
11293    fn default() -> Self {
11294        Self::DEFAULT.clone()
11295    }
11296}
11297impl MessageData for EFI_STATUS_DATA {
11298    type Message = MavMessage;
11299    const ID: u32 = 225u32;
11300    const NAME: &'static str = "EFI_STATUS";
11301    const EXTRA_CRC: u8 = 208u8;
11302    const ENCODED_LEN: usize = 73usize;
11303    fn deser(
11304        _version: MavlinkVersion,
11305        __input: &[u8],
11306    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11307        let avail_len = __input.len();
11308        let mut payload_buf = [0; Self::ENCODED_LEN];
11309        let mut buf = if avail_len < Self::ENCODED_LEN {
11310            payload_buf[0..avail_len].copy_from_slice(__input);
11311            Bytes::new(&payload_buf)
11312        } else {
11313            Bytes::new(__input)
11314        };
11315        let mut __struct = Self::default();
11316        __struct.ecu_index = buf.get_f32_le()?;
11317        __struct.rpm = buf.get_f32_le()?;
11318        __struct.fuel_consumed = buf.get_f32_le()?;
11319        __struct.fuel_flow = buf.get_f32_le()?;
11320        __struct.engine_load = buf.get_f32_le()?;
11321        __struct.throttle_position = buf.get_f32_le()?;
11322        __struct.spark_dwell_time = buf.get_f32_le()?;
11323        __struct.barometric_pressure = buf.get_f32_le()?;
11324        __struct.intake_manifold_pressure = buf.get_f32_le()?;
11325        __struct.intake_manifold_temperature = buf.get_f32_le()?;
11326        __struct.cylinder_head_temperature = buf.get_f32_le()?;
11327        __struct.ignition_timing = buf.get_f32_le()?;
11328        __struct.injection_time = buf.get_f32_le()?;
11329        __struct.exhaust_gas_temperature = buf.get_f32_le()?;
11330        __struct.throttle_out = buf.get_f32_le()?;
11331        __struct.pt_compensation = buf.get_f32_le()?;
11332        __struct.health = buf.get_u8()?;
11333        __struct.ignition_voltage = buf.get_f32_le()?;
11334        __struct.fuel_pressure = buf.get_f32_le()?;
11335        Ok(__struct)
11336    }
11337    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11338        let mut __tmp = BytesMut::new(bytes);
11339        #[allow(clippy::absurd_extreme_comparisons)]
11340        #[allow(unused_comparisons)]
11341        if __tmp.remaining() < Self::ENCODED_LEN {
11342            panic!(
11343                "buffer is too small (need {} bytes, but got {})",
11344                Self::ENCODED_LEN,
11345                __tmp.remaining(),
11346            )
11347        }
11348        __tmp.put_f32_le(self.ecu_index);
11349        __tmp.put_f32_le(self.rpm);
11350        __tmp.put_f32_le(self.fuel_consumed);
11351        __tmp.put_f32_le(self.fuel_flow);
11352        __tmp.put_f32_le(self.engine_load);
11353        __tmp.put_f32_le(self.throttle_position);
11354        __tmp.put_f32_le(self.spark_dwell_time);
11355        __tmp.put_f32_le(self.barometric_pressure);
11356        __tmp.put_f32_le(self.intake_manifold_pressure);
11357        __tmp.put_f32_le(self.intake_manifold_temperature);
11358        __tmp.put_f32_le(self.cylinder_head_temperature);
11359        __tmp.put_f32_le(self.ignition_timing);
11360        __tmp.put_f32_le(self.injection_time);
11361        __tmp.put_f32_le(self.exhaust_gas_temperature);
11362        __tmp.put_f32_le(self.throttle_out);
11363        __tmp.put_f32_le(self.pt_compensation);
11364        __tmp.put_u8(self.health);
11365        if matches!(version, MavlinkVersion::V2) {
11366            __tmp.put_f32_le(self.ignition_voltage);
11367            __tmp.put_f32_le(self.fuel_pressure);
11368            let len = __tmp.len();
11369            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11370        } else {
11371            __tmp.len()
11372        }
11373    }
11374}
11375#[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
11376#[doc = ""]
11377#[doc = "ID: 131"]
11378#[derive(Debug, Clone, PartialEq)]
11379#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11380#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11381#[cfg_attr(feature = "ts", derive(TS))]
11382#[cfg_attr(feature = "ts", ts(export))]
11383pub struct ENCAPSULATED_DATA_DATA {
11384    #[doc = "sequence number (starting with 0 on every transmission)"]
11385    pub seqnr: u16,
11386    #[doc = "image data bytes"]
11387    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11388    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11389    pub data: [u8; 253],
11390}
11391impl ENCAPSULATED_DATA_DATA {
11392    pub const ENCODED_LEN: usize = 255usize;
11393    pub const DEFAULT: Self = Self {
11394        seqnr: 0_u16,
11395        data: [0_u8; 253usize],
11396    };
11397    #[cfg(feature = "arbitrary")]
11398    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11399        use arbitrary::{Arbitrary, Unstructured};
11400        let mut buf = [0u8; 1024];
11401        rng.fill_bytes(&mut buf);
11402        let mut unstructured = Unstructured::new(&buf);
11403        Self::arbitrary(&mut unstructured).unwrap_or_default()
11404    }
11405}
11406impl Default for ENCAPSULATED_DATA_DATA {
11407    fn default() -> Self {
11408        Self::DEFAULT.clone()
11409    }
11410}
11411impl MessageData for ENCAPSULATED_DATA_DATA {
11412    type Message = MavMessage;
11413    const ID: u32 = 131u32;
11414    const NAME: &'static str = "ENCAPSULATED_DATA";
11415    const EXTRA_CRC: u8 = 223u8;
11416    const ENCODED_LEN: usize = 255usize;
11417    fn deser(
11418        _version: MavlinkVersion,
11419        __input: &[u8],
11420    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11421        let avail_len = __input.len();
11422        let mut payload_buf = [0; Self::ENCODED_LEN];
11423        let mut buf = if avail_len < Self::ENCODED_LEN {
11424            payload_buf[0..avail_len].copy_from_slice(__input);
11425            Bytes::new(&payload_buf)
11426        } else {
11427            Bytes::new(__input)
11428        };
11429        let mut __struct = Self::default();
11430        __struct.seqnr = buf.get_u16_le()?;
11431        for v in &mut __struct.data {
11432            let val = buf.get_u8()?;
11433            *v = val;
11434        }
11435        Ok(__struct)
11436    }
11437    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11438        let mut __tmp = BytesMut::new(bytes);
11439        #[allow(clippy::absurd_extreme_comparisons)]
11440        #[allow(unused_comparisons)]
11441        if __tmp.remaining() < Self::ENCODED_LEN {
11442            panic!(
11443                "buffer is too small (need {} bytes, but got {})",
11444                Self::ENCODED_LEN,
11445                __tmp.remaining(),
11446            )
11447        }
11448        __tmp.put_u16_le(self.seqnr);
11449        for val in &self.data {
11450            __tmp.put_u8(*val);
11451        }
11452        if matches!(version, MavlinkVersion::V2) {
11453            let len = __tmp.len();
11454            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11455        } else {
11456            __tmp.len()
11457        }
11458    }
11459}
11460#[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
11461#[doc = ""]
11462#[doc = "ID: 290"]
11463#[derive(Debug, Clone, PartialEq)]
11464#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11465#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11466#[cfg_attr(feature = "ts", derive(TS))]
11467#[cfg_attr(feature = "ts", ts(export))]
11468pub struct ESC_INFO_DATA {
11469    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
11470    pub time_usec: u64,
11471    #[doc = "Number of reported errors by each ESC since boot."]
11472    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11473    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11474    pub error_count: [u32; 4],
11475    #[doc = "Counter of data packets received."]
11476    pub counter: u16,
11477    #[doc = "Bitmap of ESC failure flags."]
11478    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11479    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11480    pub failure_flags: [u16; 4],
11481    #[doc = "Temperature of each ESC. INT16_MAX: if data not supplied by ESC."]
11482    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11483    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11484    pub temperature: [i16; 4],
11485    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
11486    pub index: u8,
11487    #[doc = "Total number of ESCs in all messages of this type. Message fields with an index higher than this should be ignored because they contain invalid data."]
11488    pub count: u8,
11489    #[doc = "Connection type protocol for all ESC."]
11490    pub connection_type: EscConnectionType,
11491    #[doc = "Information regarding online/offline status of each ESC."]
11492    pub info: u8,
11493}
11494impl ESC_INFO_DATA {
11495    pub const ENCODED_LEN: usize = 46usize;
11496    pub const DEFAULT: Self = Self {
11497        time_usec: 0_u64,
11498        error_count: [0_u32; 4usize],
11499        counter: 0_u16,
11500        failure_flags: [0_u16; 4usize],
11501        temperature: [0_i16; 4usize],
11502        index: 0_u8,
11503        count: 0_u8,
11504        connection_type: EscConnectionType::DEFAULT,
11505        info: 0_u8,
11506    };
11507    #[cfg(feature = "arbitrary")]
11508    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11509        use arbitrary::{Arbitrary, Unstructured};
11510        let mut buf = [0u8; 1024];
11511        rng.fill_bytes(&mut buf);
11512        let mut unstructured = Unstructured::new(&buf);
11513        Self::arbitrary(&mut unstructured).unwrap_or_default()
11514    }
11515}
11516impl Default for ESC_INFO_DATA {
11517    fn default() -> Self {
11518        Self::DEFAULT.clone()
11519    }
11520}
11521impl MessageData for ESC_INFO_DATA {
11522    type Message = MavMessage;
11523    const ID: u32 = 290u32;
11524    const NAME: &'static str = "ESC_INFO";
11525    const EXTRA_CRC: u8 = 251u8;
11526    const ENCODED_LEN: usize = 46usize;
11527    fn deser(
11528        _version: MavlinkVersion,
11529        __input: &[u8],
11530    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11531        let avail_len = __input.len();
11532        let mut payload_buf = [0; Self::ENCODED_LEN];
11533        let mut buf = if avail_len < Self::ENCODED_LEN {
11534            payload_buf[0..avail_len].copy_from_slice(__input);
11535            Bytes::new(&payload_buf)
11536        } else {
11537            Bytes::new(__input)
11538        };
11539        let mut __struct = Self::default();
11540        __struct.time_usec = buf.get_u64_le()?;
11541        for v in &mut __struct.error_count {
11542            let val = buf.get_u32_le()?;
11543            *v = val;
11544        }
11545        __struct.counter = buf.get_u16_le()?;
11546        for v in &mut __struct.failure_flags {
11547            let val = buf.get_u16_le()?;
11548            *v = val;
11549        }
11550        for v in &mut __struct.temperature {
11551            let val = buf.get_i16_le()?;
11552            *v = val;
11553        }
11554        __struct.index = buf.get_u8()?;
11555        __struct.count = buf.get_u8()?;
11556        let tmp = buf.get_u8()?;
11557        __struct.connection_type =
11558            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11559                enum_type: "EscConnectionType",
11560                value: tmp as u64,
11561            })?;
11562        __struct.info = buf.get_u8()?;
11563        Ok(__struct)
11564    }
11565    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11566        let mut __tmp = BytesMut::new(bytes);
11567        #[allow(clippy::absurd_extreme_comparisons)]
11568        #[allow(unused_comparisons)]
11569        if __tmp.remaining() < Self::ENCODED_LEN {
11570            panic!(
11571                "buffer is too small (need {} bytes, but got {})",
11572                Self::ENCODED_LEN,
11573                __tmp.remaining(),
11574            )
11575        }
11576        __tmp.put_u64_le(self.time_usec);
11577        for val in &self.error_count {
11578            __tmp.put_u32_le(*val);
11579        }
11580        __tmp.put_u16_le(self.counter);
11581        for val in &self.failure_flags {
11582            __tmp.put_u16_le(*val);
11583        }
11584        for val in &self.temperature {
11585            __tmp.put_i16_le(*val);
11586        }
11587        __tmp.put_u8(self.index);
11588        __tmp.put_u8(self.count);
11589        __tmp.put_u8(self.connection_type as u8);
11590        __tmp.put_u8(self.info);
11591        if matches!(version, MavlinkVersion::V2) {
11592            let len = __tmp.len();
11593            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11594        } else {
11595            __tmp.len()
11596        }
11597    }
11598}
11599#[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
11600#[doc = ""]
11601#[doc = "ID: 291"]
11602#[derive(Debug, Clone, PartialEq)]
11603#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11604#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11605#[cfg_attr(feature = "ts", derive(TS))]
11606#[cfg_attr(feature = "ts", ts(export))]
11607pub struct ESC_STATUS_DATA {
11608    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
11609    pub time_usec: u64,
11610    #[doc = "Reported motor RPM from each ESC (negative for reverse rotation)."]
11611    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11612    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11613    pub rpm: [i32; 4],
11614    #[doc = "Voltage measured from each ESC."]
11615    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11616    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11617    pub voltage: [f32; 4],
11618    #[doc = "Current measured from each ESC."]
11619    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11620    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11621    pub current: [f32; 4],
11622    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
11623    pub index: u8,
11624}
11625impl ESC_STATUS_DATA {
11626    pub const ENCODED_LEN: usize = 57usize;
11627    pub const DEFAULT: Self = Self {
11628        time_usec: 0_u64,
11629        rpm: [0_i32; 4usize],
11630        voltage: [0.0_f32; 4usize],
11631        current: [0.0_f32; 4usize],
11632        index: 0_u8,
11633    };
11634    #[cfg(feature = "arbitrary")]
11635    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11636        use arbitrary::{Arbitrary, Unstructured};
11637        let mut buf = [0u8; 1024];
11638        rng.fill_bytes(&mut buf);
11639        let mut unstructured = Unstructured::new(&buf);
11640        Self::arbitrary(&mut unstructured).unwrap_or_default()
11641    }
11642}
11643impl Default for ESC_STATUS_DATA {
11644    fn default() -> Self {
11645        Self::DEFAULT.clone()
11646    }
11647}
11648impl MessageData for ESC_STATUS_DATA {
11649    type Message = MavMessage;
11650    const ID: u32 = 291u32;
11651    const NAME: &'static str = "ESC_STATUS";
11652    const EXTRA_CRC: u8 = 10u8;
11653    const ENCODED_LEN: usize = 57usize;
11654    fn deser(
11655        _version: MavlinkVersion,
11656        __input: &[u8],
11657    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11658        let avail_len = __input.len();
11659        let mut payload_buf = [0; Self::ENCODED_LEN];
11660        let mut buf = if avail_len < Self::ENCODED_LEN {
11661            payload_buf[0..avail_len].copy_from_slice(__input);
11662            Bytes::new(&payload_buf)
11663        } else {
11664            Bytes::new(__input)
11665        };
11666        let mut __struct = Self::default();
11667        __struct.time_usec = buf.get_u64_le()?;
11668        for v in &mut __struct.rpm {
11669            let val = buf.get_i32_le()?;
11670            *v = val;
11671        }
11672        for v in &mut __struct.voltage {
11673            let val = buf.get_f32_le()?;
11674            *v = val;
11675        }
11676        for v in &mut __struct.current {
11677            let val = buf.get_f32_le()?;
11678            *v = val;
11679        }
11680        __struct.index = buf.get_u8()?;
11681        Ok(__struct)
11682    }
11683    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11684        let mut __tmp = BytesMut::new(bytes);
11685        #[allow(clippy::absurd_extreme_comparisons)]
11686        #[allow(unused_comparisons)]
11687        if __tmp.remaining() < Self::ENCODED_LEN {
11688            panic!(
11689                "buffer is too small (need {} bytes, but got {})",
11690                Self::ENCODED_LEN,
11691                __tmp.remaining(),
11692            )
11693        }
11694        __tmp.put_u64_le(self.time_usec);
11695        for val in &self.rpm {
11696            __tmp.put_i32_le(*val);
11697        }
11698        for val in &self.voltage {
11699            __tmp.put_f32_le(*val);
11700        }
11701        for val in &self.current {
11702            __tmp.put_f32_le(*val);
11703        }
11704        __tmp.put_u8(self.index);
11705        if matches!(version, MavlinkVersion::V2) {
11706            let len = __tmp.len();
11707            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11708        } else {
11709            __tmp.len()
11710        }
11711    }
11712}
11713#[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
11714#[doc = ""]
11715#[doc = "ID: 230"]
11716#[derive(Debug, Clone, PartialEq)]
11717#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11718#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11719#[cfg_attr(feature = "ts", derive(TS))]
11720#[cfg_attr(feature = "ts", ts(export))]
11721pub struct ESTIMATOR_STATUS_DATA {
11722    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
11723    pub time_usec: u64,
11724    #[doc = "Velocity innovation test ratio"]
11725    pub vel_ratio: f32,
11726    #[doc = "Horizontal position innovation test ratio"]
11727    pub pos_horiz_ratio: f32,
11728    #[doc = "Vertical position innovation test ratio"]
11729    pub pos_vert_ratio: f32,
11730    #[doc = "Magnetometer innovation test ratio"]
11731    pub mag_ratio: f32,
11732    #[doc = "Height above terrain innovation test ratio"]
11733    pub hagl_ratio: f32,
11734    #[doc = "True airspeed innovation test ratio"]
11735    pub tas_ratio: f32,
11736    #[doc = "Horizontal position 1-STD accuracy relative to the EKF local origin"]
11737    pub pos_horiz_accuracy: f32,
11738    #[doc = "Vertical position 1-STD accuracy relative to the EKF local origin"]
11739    pub pos_vert_accuracy: f32,
11740    #[doc = "Bitmap indicating which EKF outputs are valid."]
11741    pub flags: EstimatorStatusFlags,
11742}
11743impl ESTIMATOR_STATUS_DATA {
11744    pub const ENCODED_LEN: usize = 42usize;
11745    pub const DEFAULT: Self = Self {
11746        time_usec: 0_u64,
11747        vel_ratio: 0.0_f32,
11748        pos_horiz_ratio: 0.0_f32,
11749        pos_vert_ratio: 0.0_f32,
11750        mag_ratio: 0.0_f32,
11751        hagl_ratio: 0.0_f32,
11752        tas_ratio: 0.0_f32,
11753        pos_horiz_accuracy: 0.0_f32,
11754        pos_vert_accuracy: 0.0_f32,
11755        flags: EstimatorStatusFlags::DEFAULT,
11756    };
11757    #[cfg(feature = "arbitrary")]
11758    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11759        use arbitrary::{Arbitrary, Unstructured};
11760        let mut buf = [0u8; 1024];
11761        rng.fill_bytes(&mut buf);
11762        let mut unstructured = Unstructured::new(&buf);
11763        Self::arbitrary(&mut unstructured).unwrap_or_default()
11764    }
11765}
11766impl Default for ESTIMATOR_STATUS_DATA {
11767    fn default() -> Self {
11768        Self::DEFAULT.clone()
11769    }
11770}
11771impl MessageData for ESTIMATOR_STATUS_DATA {
11772    type Message = MavMessage;
11773    const ID: u32 = 230u32;
11774    const NAME: &'static str = "ESTIMATOR_STATUS";
11775    const EXTRA_CRC: u8 = 163u8;
11776    const ENCODED_LEN: usize = 42usize;
11777    fn deser(
11778        _version: MavlinkVersion,
11779        __input: &[u8],
11780    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11781        let avail_len = __input.len();
11782        let mut payload_buf = [0; Self::ENCODED_LEN];
11783        let mut buf = if avail_len < Self::ENCODED_LEN {
11784            payload_buf[0..avail_len].copy_from_slice(__input);
11785            Bytes::new(&payload_buf)
11786        } else {
11787            Bytes::new(__input)
11788        };
11789        let mut __struct = Self::default();
11790        __struct.time_usec = buf.get_u64_le()?;
11791        __struct.vel_ratio = buf.get_f32_le()?;
11792        __struct.pos_horiz_ratio = buf.get_f32_le()?;
11793        __struct.pos_vert_ratio = buf.get_f32_le()?;
11794        __struct.mag_ratio = buf.get_f32_le()?;
11795        __struct.hagl_ratio = buf.get_f32_le()?;
11796        __struct.tas_ratio = buf.get_f32_le()?;
11797        __struct.pos_horiz_accuracy = buf.get_f32_le()?;
11798        __struct.pos_vert_accuracy = buf.get_f32_le()?;
11799        let tmp = buf.get_u16_le()?;
11800        __struct.flags = EstimatorStatusFlags::from_bits(
11801            tmp as <EstimatorStatusFlags as Flags>::Bits,
11802        )
11803        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
11804            flag_type: "EstimatorStatusFlags",
11805            value: tmp as u64,
11806        })?;
11807        Ok(__struct)
11808    }
11809    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11810        let mut __tmp = BytesMut::new(bytes);
11811        #[allow(clippy::absurd_extreme_comparisons)]
11812        #[allow(unused_comparisons)]
11813        if __tmp.remaining() < Self::ENCODED_LEN {
11814            panic!(
11815                "buffer is too small (need {} bytes, but got {})",
11816                Self::ENCODED_LEN,
11817                __tmp.remaining(),
11818            )
11819        }
11820        __tmp.put_u64_le(self.time_usec);
11821        __tmp.put_f32_le(self.vel_ratio);
11822        __tmp.put_f32_le(self.pos_horiz_ratio);
11823        __tmp.put_f32_le(self.pos_vert_ratio);
11824        __tmp.put_f32_le(self.mag_ratio);
11825        __tmp.put_f32_le(self.hagl_ratio);
11826        __tmp.put_f32_le(self.tas_ratio);
11827        __tmp.put_f32_le(self.pos_horiz_accuracy);
11828        __tmp.put_f32_le(self.pos_vert_accuracy);
11829        __tmp.put_u16_le(self.flags.bits() as u16);
11830        if matches!(version, MavlinkVersion::V2) {
11831            let len = __tmp.len();
11832            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11833        } else {
11834            __tmp.len()
11835        }
11836    }
11837}
11838#[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
11839#[doc = ""]
11840#[doc = "ID: 410"]
11841#[derive(Debug, Clone, PartialEq)]
11842#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11843#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11844#[cfg_attr(feature = "ts", derive(TS))]
11845#[cfg_attr(feature = "ts", ts(export))]
11846pub struct EVENT_DATA {
11847    #[doc = "Event ID (as defined in the component metadata)"]
11848    pub id: u32,
11849    #[doc = "Timestamp (time since system boot when the event happened)."]
11850    pub event_time_boot_ms: u32,
11851    #[doc = "Sequence number."]
11852    pub sequence: u16,
11853    #[doc = "Component ID"]
11854    pub destination_component: u8,
11855    #[doc = "System ID"]
11856    pub destination_system: u8,
11857    #[doc = "Log levels: 4 bits MSB: internal (for logging purposes), 4 bits LSB: external. Levels: Emergency = 0, Alert = 1, Critical = 2, Error = 3, Warning = 4, Notice = 5, Info = 6, Debug = 7, Protocol = 8, Disabled = 9"]
11858    pub log_levels: u8,
11859    #[doc = "Arguments (depend on event ID)."]
11860    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11861    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
11862    pub arguments: [u8; 40],
11863}
11864impl EVENT_DATA {
11865    pub const ENCODED_LEN: usize = 53usize;
11866    pub const DEFAULT: Self = Self {
11867        id: 0_u32,
11868        event_time_boot_ms: 0_u32,
11869        sequence: 0_u16,
11870        destination_component: 0_u8,
11871        destination_system: 0_u8,
11872        log_levels: 0_u8,
11873        arguments: [0_u8; 40usize],
11874    };
11875    #[cfg(feature = "arbitrary")]
11876    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11877        use arbitrary::{Arbitrary, Unstructured};
11878        let mut buf = [0u8; 1024];
11879        rng.fill_bytes(&mut buf);
11880        let mut unstructured = Unstructured::new(&buf);
11881        Self::arbitrary(&mut unstructured).unwrap_or_default()
11882    }
11883}
11884impl Default for EVENT_DATA {
11885    fn default() -> Self {
11886        Self::DEFAULT.clone()
11887    }
11888}
11889impl MessageData for EVENT_DATA {
11890    type Message = MavMessage;
11891    const ID: u32 = 410u32;
11892    const NAME: &'static str = "EVENT";
11893    const EXTRA_CRC: u8 = 160u8;
11894    const ENCODED_LEN: usize = 53usize;
11895    fn deser(
11896        _version: MavlinkVersion,
11897        __input: &[u8],
11898    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11899        let avail_len = __input.len();
11900        let mut payload_buf = [0; Self::ENCODED_LEN];
11901        let mut buf = if avail_len < Self::ENCODED_LEN {
11902            payload_buf[0..avail_len].copy_from_slice(__input);
11903            Bytes::new(&payload_buf)
11904        } else {
11905            Bytes::new(__input)
11906        };
11907        let mut __struct = Self::default();
11908        __struct.id = buf.get_u32_le()?;
11909        __struct.event_time_boot_ms = buf.get_u32_le()?;
11910        __struct.sequence = buf.get_u16_le()?;
11911        __struct.destination_component = buf.get_u8()?;
11912        __struct.destination_system = buf.get_u8()?;
11913        __struct.log_levels = buf.get_u8()?;
11914        for v in &mut __struct.arguments {
11915            let val = buf.get_u8()?;
11916            *v = val;
11917        }
11918        Ok(__struct)
11919    }
11920    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11921        let mut __tmp = BytesMut::new(bytes);
11922        #[allow(clippy::absurd_extreme_comparisons)]
11923        #[allow(unused_comparisons)]
11924        if __tmp.remaining() < Self::ENCODED_LEN {
11925            panic!(
11926                "buffer is too small (need {} bytes, but got {})",
11927                Self::ENCODED_LEN,
11928                __tmp.remaining(),
11929            )
11930        }
11931        __tmp.put_u32_le(self.id);
11932        __tmp.put_u32_le(self.event_time_boot_ms);
11933        __tmp.put_u16_le(self.sequence);
11934        __tmp.put_u8(self.destination_component);
11935        __tmp.put_u8(self.destination_system);
11936        __tmp.put_u8(self.log_levels);
11937        for val in &self.arguments {
11938            __tmp.put_u8(*val);
11939        }
11940        if matches!(version, MavlinkVersion::V2) {
11941            let len = __tmp.len();
11942            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11943        } else {
11944            __tmp.len()
11945        }
11946    }
11947}
11948#[doc = "Provides state for additional features."]
11949#[doc = ""]
11950#[doc = "ID: 245"]
11951#[derive(Debug, Clone, PartialEq)]
11952#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11953#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11954#[cfg_attr(feature = "ts", derive(TS))]
11955#[cfg_attr(feature = "ts", ts(export))]
11956pub struct EXTENDED_SYS_STATE_DATA {
11957    #[doc = "The VTOL state if applicable. Is set to MAV_VTOL_STATE_UNDEFINED if UAV is not in VTOL configuration."]
11958    pub vtol_state: MavVtolState,
11959    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
11960    pub landed_state: MavLandedState,
11961}
11962impl EXTENDED_SYS_STATE_DATA {
11963    pub const ENCODED_LEN: usize = 2usize;
11964    pub const DEFAULT: Self = Self {
11965        vtol_state: MavVtolState::DEFAULT,
11966        landed_state: MavLandedState::DEFAULT,
11967    };
11968    #[cfg(feature = "arbitrary")]
11969    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11970        use arbitrary::{Arbitrary, Unstructured};
11971        let mut buf = [0u8; 1024];
11972        rng.fill_bytes(&mut buf);
11973        let mut unstructured = Unstructured::new(&buf);
11974        Self::arbitrary(&mut unstructured).unwrap_or_default()
11975    }
11976}
11977impl Default for EXTENDED_SYS_STATE_DATA {
11978    fn default() -> Self {
11979        Self::DEFAULT.clone()
11980    }
11981}
11982impl MessageData for EXTENDED_SYS_STATE_DATA {
11983    type Message = MavMessage;
11984    const ID: u32 = 245u32;
11985    const NAME: &'static str = "EXTENDED_SYS_STATE";
11986    const EXTRA_CRC: u8 = 130u8;
11987    const ENCODED_LEN: usize = 2usize;
11988    fn deser(
11989        _version: MavlinkVersion,
11990        __input: &[u8],
11991    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11992        let avail_len = __input.len();
11993        let mut payload_buf = [0; Self::ENCODED_LEN];
11994        let mut buf = if avail_len < Self::ENCODED_LEN {
11995            payload_buf[0..avail_len].copy_from_slice(__input);
11996            Bytes::new(&payload_buf)
11997        } else {
11998            Bytes::new(__input)
11999        };
12000        let mut __struct = Self::default();
12001        let tmp = buf.get_u8()?;
12002        __struct.vtol_state =
12003            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12004                enum_type: "MavVtolState",
12005                value: tmp as u64,
12006            })?;
12007        let tmp = buf.get_u8()?;
12008        __struct.landed_state =
12009            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12010                enum_type: "MavLandedState",
12011                value: tmp as u64,
12012            })?;
12013        Ok(__struct)
12014    }
12015    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12016        let mut __tmp = BytesMut::new(bytes);
12017        #[allow(clippy::absurd_extreme_comparisons)]
12018        #[allow(unused_comparisons)]
12019        if __tmp.remaining() < Self::ENCODED_LEN {
12020            panic!(
12021                "buffer is too small (need {} bytes, but got {})",
12022                Self::ENCODED_LEN,
12023                __tmp.remaining(),
12024            )
12025        }
12026        __tmp.put_u8(self.vtol_state as u8);
12027        __tmp.put_u8(self.landed_state as u8);
12028        if matches!(version, MavlinkVersion::V2) {
12029            let len = __tmp.len();
12030            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12031        } else {
12032            __tmp.len()
12033        }
12034    }
12035}
12036#[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
12037#[doc = ""]
12038#[doc = "ID: 162"]
12039#[derive(Debug, Clone, PartialEq)]
12040#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12041#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12042#[cfg_attr(feature = "ts", derive(TS))]
12043#[cfg_attr(feature = "ts", ts(export))]
12044pub struct FENCE_STATUS_DATA {
12045    #[doc = "Time (since boot) of last breach."]
12046    pub breach_time: u32,
12047    #[doc = "Number of fence breaches."]
12048    pub breach_count: u16,
12049    #[doc = "Breach status (0 if currently inside fence, 1 if outside)."]
12050    pub breach_status: u8,
12051    #[doc = "Last breach type."]
12052    pub breach_type: FenceBreach,
12053    #[doc = "Active action to prevent fence breach"]
12054    #[cfg_attr(feature = "serde", serde(default))]
12055    pub breach_mitigation: FenceMitigate,
12056}
12057impl FENCE_STATUS_DATA {
12058    pub const ENCODED_LEN: usize = 9usize;
12059    pub const DEFAULT: Self = Self {
12060        breach_time: 0_u32,
12061        breach_count: 0_u16,
12062        breach_status: 0_u8,
12063        breach_type: FenceBreach::DEFAULT,
12064        breach_mitigation: FenceMitigate::DEFAULT,
12065    };
12066    #[cfg(feature = "arbitrary")]
12067    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12068        use arbitrary::{Arbitrary, Unstructured};
12069        let mut buf = [0u8; 1024];
12070        rng.fill_bytes(&mut buf);
12071        let mut unstructured = Unstructured::new(&buf);
12072        Self::arbitrary(&mut unstructured).unwrap_or_default()
12073    }
12074}
12075impl Default for FENCE_STATUS_DATA {
12076    fn default() -> Self {
12077        Self::DEFAULT.clone()
12078    }
12079}
12080impl MessageData for FENCE_STATUS_DATA {
12081    type Message = MavMessage;
12082    const ID: u32 = 162u32;
12083    const NAME: &'static str = "FENCE_STATUS";
12084    const EXTRA_CRC: u8 = 189u8;
12085    const ENCODED_LEN: usize = 9usize;
12086    fn deser(
12087        _version: MavlinkVersion,
12088        __input: &[u8],
12089    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12090        let avail_len = __input.len();
12091        let mut payload_buf = [0; Self::ENCODED_LEN];
12092        let mut buf = if avail_len < Self::ENCODED_LEN {
12093            payload_buf[0..avail_len].copy_from_slice(__input);
12094            Bytes::new(&payload_buf)
12095        } else {
12096            Bytes::new(__input)
12097        };
12098        let mut __struct = Self::default();
12099        __struct.breach_time = buf.get_u32_le()?;
12100        __struct.breach_count = buf.get_u16_le()?;
12101        __struct.breach_status = buf.get_u8()?;
12102        let tmp = buf.get_u8()?;
12103        __struct.breach_type =
12104            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12105                enum_type: "FenceBreach",
12106                value: tmp as u64,
12107            })?;
12108        let tmp = buf.get_u8()?;
12109        __struct.breach_mitigation =
12110            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12111                enum_type: "FenceMitigate",
12112                value: tmp as u64,
12113            })?;
12114        Ok(__struct)
12115    }
12116    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12117        let mut __tmp = BytesMut::new(bytes);
12118        #[allow(clippy::absurd_extreme_comparisons)]
12119        #[allow(unused_comparisons)]
12120        if __tmp.remaining() < Self::ENCODED_LEN {
12121            panic!(
12122                "buffer is too small (need {} bytes, but got {})",
12123                Self::ENCODED_LEN,
12124                __tmp.remaining(),
12125            )
12126        }
12127        __tmp.put_u32_le(self.breach_time);
12128        __tmp.put_u16_le(self.breach_count);
12129        __tmp.put_u8(self.breach_status);
12130        __tmp.put_u8(self.breach_type as u8);
12131        if matches!(version, MavlinkVersion::V2) {
12132            __tmp.put_u8(self.breach_mitigation as u8);
12133            let len = __tmp.len();
12134            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12135        } else {
12136            __tmp.len()
12137        }
12138    }
12139}
12140#[doc = "Vehicle status report that is sent out while figure eight execution is in progress (see MAV_CMD_DO_FIGURE_EIGHT).         This may typically send at low rates: of the order of 2Hz."]
12141#[doc = ""]
12142#[doc = "ID: 361"]
12143#[derive(Debug, Clone, PartialEq)]
12144#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12145#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12146#[cfg_attr(feature = "ts", derive(TS))]
12147#[cfg_attr(feature = "ts", ts(export))]
12148pub struct FIGURE_EIGHT_EXECUTION_STATUS_DATA {
12149    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
12150    pub time_usec: u64,
12151    #[doc = "Major axis radius of the figure eight. Positive: orbit the north circle clockwise. Negative: orbit the north circle counter-clockwise."]
12152    pub major_radius: f32,
12153    #[doc = "Minor axis radius of the figure eight. Defines the radius of two circles that make up the figure."]
12154    pub minor_radius: f32,
12155    #[doc = "Orientation of the figure eight major axis with respect to true north in [-pi,pi)."]
12156    pub orientation: f32,
12157    #[doc = "X coordinate of center point. Coordinate system depends on frame field."]
12158    pub x: i32,
12159    #[doc = "Y coordinate of center point. Coordinate system depends on frame field."]
12160    pub y: i32,
12161    #[doc = "Altitude of center point. Coordinate system depends on frame field."]
12162    pub z: f32,
12163    #[doc = "The coordinate system of the fields: x, y, z."]
12164    pub frame: MavFrame,
12165}
12166impl FIGURE_EIGHT_EXECUTION_STATUS_DATA {
12167    pub const ENCODED_LEN: usize = 33usize;
12168    pub const DEFAULT: Self = Self {
12169        time_usec: 0_u64,
12170        major_radius: 0.0_f32,
12171        minor_radius: 0.0_f32,
12172        orientation: 0.0_f32,
12173        x: 0_i32,
12174        y: 0_i32,
12175        z: 0.0_f32,
12176        frame: MavFrame::DEFAULT,
12177    };
12178    #[cfg(feature = "arbitrary")]
12179    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12180        use arbitrary::{Arbitrary, Unstructured};
12181        let mut buf = [0u8; 1024];
12182        rng.fill_bytes(&mut buf);
12183        let mut unstructured = Unstructured::new(&buf);
12184        Self::arbitrary(&mut unstructured).unwrap_or_default()
12185    }
12186}
12187impl Default for FIGURE_EIGHT_EXECUTION_STATUS_DATA {
12188    fn default() -> Self {
12189        Self::DEFAULT.clone()
12190    }
12191}
12192impl MessageData for FIGURE_EIGHT_EXECUTION_STATUS_DATA {
12193    type Message = MavMessage;
12194    const ID: u32 = 361u32;
12195    const NAME: &'static str = "FIGURE_EIGHT_EXECUTION_STATUS";
12196    const EXTRA_CRC: u8 = 93u8;
12197    const ENCODED_LEN: usize = 33usize;
12198    fn deser(
12199        _version: MavlinkVersion,
12200        __input: &[u8],
12201    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12202        let avail_len = __input.len();
12203        let mut payload_buf = [0; Self::ENCODED_LEN];
12204        let mut buf = if avail_len < Self::ENCODED_LEN {
12205            payload_buf[0..avail_len].copy_from_slice(__input);
12206            Bytes::new(&payload_buf)
12207        } else {
12208            Bytes::new(__input)
12209        };
12210        let mut __struct = Self::default();
12211        __struct.time_usec = buf.get_u64_le()?;
12212        __struct.major_radius = buf.get_f32_le()?;
12213        __struct.minor_radius = buf.get_f32_le()?;
12214        __struct.orientation = buf.get_f32_le()?;
12215        __struct.x = buf.get_i32_le()?;
12216        __struct.y = buf.get_i32_le()?;
12217        __struct.z = buf.get_f32_le()?;
12218        let tmp = buf.get_u8()?;
12219        __struct.frame =
12220            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12221                enum_type: "MavFrame",
12222                value: tmp as u64,
12223            })?;
12224        Ok(__struct)
12225    }
12226    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12227        let mut __tmp = BytesMut::new(bytes);
12228        #[allow(clippy::absurd_extreme_comparisons)]
12229        #[allow(unused_comparisons)]
12230        if __tmp.remaining() < Self::ENCODED_LEN {
12231            panic!(
12232                "buffer is too small (need {} bytes, but got {})",
12233                Self::ENCODED_LEN,
12234                __tmp.remaining(),
12235            )
12236        }
12237        __tmp.put_u64_le(self.time_usec);
12238        __tmp.put_f32_le(self.major_radius);
12239        __tmp.put_f32_le(self.minor_radius);
12240        __tmp.put_f32_le(self.orientation);
12241        __tmp.put_i32_le(self.x);
12242        __tmp.put_i32_le(self.y);
12243        __tmp.put_f32_le(self.z);
12244        __tmp.put_u8(self.frame as u8);
12245        if matches!(version, MavlinkVersion::V2) {
12246            let len = __tmp.len();
12247            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12248        } else {
12249            __tmp.len()
12250        }
12251    }
12252}
12253#[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
12254#[doc = ""]
12255#[doc = "ID: 110"]
12256#[derive(Debug, Clone, PartialEq)]
12257#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12258#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12259#[cfg_attr(feature = "ts", derive(TS))]
12260#[cfg_attr(feature = "ts", ts(export))]
12261pub struct FILE_TRANSFER_PROTOCOL_DATA {
12262    #[doc = "Network ID (0 for broadcast)"]
12263    pub target_network: u8,
12264    #[doc = "System ID (0 for broadcast)"]
12265    pub target_system: u8,
12266    #[doc = "Component ID (0 for broadcast)"]
12267    pub target_component: u8,
12268    #[doc = "Variable length payload. The length is defined by the remaining message length when subtracting the header and other fields. The content/format of this block is defined in <https://mavlink.io/en/services/ftp.html>."]
12269    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12270    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12271    pub payload: [u8; 251],
12272}
12273impl FILE_TRANSFER_PROTOCOL_DATA {
12274    pub const ENCODED_LEN: usize = 254usize;
12275    pub const DEFAULT: Self = Self {
12276        target_network: 0_u8,
12277        target_system: 0_u8,
12278        target_component: 0_u8,
12279        payload: [0_u8; 251usize],
12280    };
12281    #[cfg(feature = "arbitrary")]
12282    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12283        use arbitrary::{Arbitrary, Unstructured};
12284        let mut buf = [0u8; 1024];
12285        rng.fill_bytes(&mut buf);
12286        let mut unstructured = Unstructured::new(&buf);
12287        Self::arbitrary(&mut unstructured).unwrap_or_default()
12288    }
12289}
12290impl Default for FILE_TRANSFER_PROTOCOL_DATA {
12291    fn default() -> Self {
12292        Self::DEFAULT.clone()
12293    }
12294}
12295impl MessageData for FILE_TRANSFER_PROTOCOL_DATA {
12296    type Message = MavMessage;
12297    const ID: u32 = 110u32;
12298    const NAME: &'static str = "FILE_TRANSFER_PROTOCOL";
12299    const EXTRA_CRC: u8 = 84u8;
12300    const ENCODED_LEN: usize = 254usize;
12301    fn deser(
12302        _version: MavlinkVersion,
12303        __input: &[u8],
12304    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12305        let avail_len = __input.len();
12306        let mut payload_buf = [0; Self::ENCODED_LEN];
12307        let mut buf = if avail_len < Self::ENCODED_LEN {
12308            payload_buf[0..avail_len].copy_from_slice(__input);
12309            Bytes::new(&payload_buf)
12310        } else {
12311            Bytes::new(__input)
12312        };
12313        let mut __struct = Self::default();
12314        __struct.target_network = buf.get_u8()?;
12315        __struct.target_system = buf.get_u8()?;
12316        __struct.target_component = buf.get_u8()?;
12317        for v in &mut __struct.payload {
12318            let val = buf.get_u8()?;
12319            *v = val;
12320        }
12321        Ok(__struct)
12322    }
12323    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12324        let mut __tmp = BytesMut::new(bytes);
12325        #[allow(clippy::absurd_extreme_comparisons)]
12326        #[allow(unused_comparisons)]
12327        if __tmp.remaining() < Self::ENCODED_LEN {
12328            panic!(
12329                "buffer is too small (need {} bytes, but got {})",
12330                Self::ENCODED_LEN,
12331                __tmp.remaining(),
12332            )
12333        }
12334        __tmp.put_u8(self.target_network);
12335        __tmp.put_u8(self.target_system);
12336        __tmp.put_u8(self.target_component);
12337        for val in &self.payload {
12338            __tmp.put_u8(*val);
12339        }
12340        if matches!(version, MavlinkVersion::V2) {
12341            let len = __tmp.len();
12342            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12343        } else {
12344            __tmp.len()
12345        }
12346    }
12347}
12348#[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
12349#[doc = ""]
12350#[doc = "ID: 264"]
12351#[derive(Debug, Clone, PartialEq)]
12352#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12353#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12354#[cfg_attr(feature = "ts", derive(TS))]
12355#[cfg_attr(feature = "ts", ts(export))]
12356pub struct FLIGHT_INFORMATION_DATA {
12357    #[doc = "Timestamp at arming (since system boot). Set to 0 on boot. Set value on arming. Note, field is misnamed UTC."]
12358    pub arming_time_utc: u64,
12359    #[doc = "Timestamp at takeoff (since system boot). Set to 0 at boot and on arming. Note, field is misnamed UTC."]
12360    pub takeoff_time_utc: u64,
12361    #[doc = "Flight number. Note, field is misnamed UUID."]
12362    pub flight_uuid: u64,
12363    #[doc = "Timestamp (time since system boot)."]
12364    pub time_boot_ms: u32,
12365    #[doc = "Timestamp at landing (in ms since system boot). Set to 0 at boot and on arming."]
12366    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12367    pub landing_time: u32,
12368}
12369impl FLIGHT_INFORMATION_DATA {
12370    pub const ENCODED_LEN: usize = 32usize;
12371    pub const DEFAULT: Self = Self {
12372        arming_time_utc: 0_u64,
12373        takeoff_time_utc: 0_u64,
12374        flight_uuid: 0_u64,
12375        time_boot_ms: 0_u32,
12376        landing_time: 0_u32,
12377    };
12378    #[cfg(feature = "arbitrary")]
12379    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12380        use arbitrary::{Arbitrary, Unstructured};
12381        let mut buf = [0u8; 1024];
12382        rng.fill_bytes(&mut buf);
12383        let mut unstructured = Unstructured::new(&buf);
12384        Self::arbitrary(&mut unstructured).unwrap_or_default()
12385    }
12386}
12387impl Default for FLIGHT_INFORMATION_DATA {
12388    fn default() -> Self {
12389        Self::DEFAULT.clone()
12390    }
12391}
12392impl MessageData for FLIGHT_INFORMATION_DATA {
12393    type Message = MavMessage;
12394    const ID: u32 = 264u32;
12395    const NAME: &'static str = "FLIGHT_INFORMATION";
12396    const EXTRA_CRC: u8 = 49u8;
12397    const ENCODED_LEN: usize = 32usize;
12398    fn deser(
12399        _version: MavlinkVersion,
12400        __input: &[u8],
12401    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12402        let avail_len = __input.len();
12403        let mut payload_buf = [0; Self::ENCODED_LEN];
12404        let mut buf = if avail_len < Self::ENCODED_LEN {
12405            payload_buf[0..avail_len].copy_from_slice(__input);
12406            Bytes::new(&payload_buf)
12407        } else {
12408            Bytes::new(__input)
12409        };
12410        let mut __struct = Self::default();
12411        __struct.arming_time_utc = buf.get_u64_le()?;
12412        __struct.takeoff_time_utc = buf.get_u64_le()?;
12413        __struct.flight_uuid = buf.get_u64_le()?;
12414        __struct.time_boot_ms = buf.get_u32_le()?;
12415        __struct.landing_time = buf.get_u32_le()?;
12416        Ok(__struct)
12417    }
12418    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12419        let mut __tmp = BytesMut::new(bytes);
12420        #[allow(clippy::absurd_extreme_comparisons)]
12421        #[allow(unused_comparisons)]
12422        if __tmp.remaining() < Self::ENCODED_LEN {
12423            panic!(
12424                "buffer is too small (need {} bytes, but got {})",
12425                Self::ENCODED_LEN,
12426                __tmp.remaining(),
12427            )
12428        }
12429        __tmp.put_u64_le(self.arming_time_utc);
12430        __tmp.put_u64_le(self.takeoff_time_utc);
12431        __tmp.put_u64_le(self.flight_uuid);
12432        __tmp.put_u32_le(self.time_boot_ms);
12433        if matches!(version, MavlinkVersion::V2) {
12434            __tmp.put_u32_le(self.landing_time);
12435            let len = __tmp.len();
12436            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12437        } else {
12438            __tmp.len()
12439        }
12440    }
12441}
12442#[doc = "Current motion information from a designated system."]
12443#[doc = ""]
12444#[doc = "ID: 144"]
12445#[derive(Debug, Clone, PartialEq)]
12446#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12447#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12448#[cfg_attr(feature = "ts", derive(TS))]
12449#[cfg_attr(feature = "ts", ts(export))]
12450pub struct FOLLOW_TARGET_DATA {
12451    #[doc = "Timestamp (time since system boot)."]
12452    pub timestamp: u64,
12453    #[doc = "button states or switches of a tracker device"]
12454    pub custom_state: u64,
12455    #[doc = "Latitude (WGS84)"]
12456    pub lat: i32,
12457    #[doc = "Longitude (WGS84)"]
12458    pub lon: i32,
12459    #[doc = "Altitude (MSL)"]
12460    pub alt: f32,
12461    #[doc = "target velocity (0,0,0) for unknown"]
12462    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12463    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12464    pub vel: [f32; 3],
12465    #[doc = "linear target acceleration (0,0,0) for unknown"]
12466    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12467    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12468    pub acc: [f32; 3],
12469    #[doc = "(0 0 0 0 for unknown)"]
12470    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12471    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12472    pub attitude_q: [f32; 4],
12473    #[doc = "(0 0 0 for unknown)"]
12474    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12475    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12476    pub rates: [f32; 3],
12477    #[doc = "eph epv"]
12478    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12479    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12480    pub position_cov: [f32; 3],
12481    #[doc = "bit positions for tracker reporting capabilities (POS = 0, VEL = 1, ACCEL = 2, ATT + RATES = 3)"]
12482    pub est_capabilities: u8,
12483}
12484impl FOLLOW_TARGET_DATA {
12485    pub const ENCODED_LEN: usize = 93usize;
12486    pub const DEFAULT: Self = Self {
12487        timestamp: 0_u64,
12488        custom_state: 0_u64,
12489        lat: 0_i32,
12490        lon: 0_i32,
12491        alt: 0.0_f32,
12492        vel: [0.0_f32; 3usize],
12493        acc: [0.0_f32; 3usize],
12494        attitude_q: [0.0_f32; 4usize],
12495        rates: [0.0_f32; 3usize],
12496        position_cov: [0.0_f32; 3usize],
12497        est_capabilities: 0_u8,
12498    };
12499    #[cfg(feature = "arbitrary")]
12500    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12501        use arbitrary::{Arbitrary, Unstructured};
12502        let mut buf = [0u8; 1024];
12503        rng.fill_bytes(&mut buf);
12504        let mut unstructured = Unstructured::new(&buf);
12505        Self::arbitrary(&mut unstructured).unwrap_or_default()
12506    }
12507}
12508impl Default for FOLLOW_TARGET_DATA {
12509    fn default() -> Self {
12510        Self::DEFAULT.clone()
12511    }
12512}
12513impl MessageData for FOLLOW_TARGET_DATA {
12514    type Message = MavMessage;
12515    const ID: u32 = 144u32;
12516    const NAME: &'static str = "FOLLOW_TARGET";
12517    const EXTRA_CRC: u8 = 127u8;
12518    const ENCODED_LEN: usize = 93usize;
12519    fn deser(
12520        _version: MavlinkVersion,
12521        __input: &[u8],
12522    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12523        let avail_len = __input.len();
12524        let mut payload_buf = [0; Self::ENCODED_LEN];
12525        let mut buf = if avail_len < Self::ENCODED_LEN {
12526            payload_buf[0..avail_len].copy_from_slice(__input);
12527            Bytes::new(&payload_buf)
12528        } else {
12529            Bytes::new(__input)
12530        };
12531        let mut __struct = Self::default();
12532        __struct.timestamp = buf.get_u64_le()?;
12533        __struct.custom_state = buf.get_u64_le()?;
12534        __struct.lat = buf.get_i32_le()?;
12535        __struct.lon = buf.get_i32_le()?;
12536        __struct.alt = buf.get_f32_le()?;
12537        for v in &mut __struct.vel {
12538            let val = buf.get_f32_le()?;
12539            *v = val;
12540        }
12541        for v in &mut __struct.acc {
12542            let val = buf.get_f32_le()?;
12543            *v = val;
12544        }
12545        for v in &mut __struct.attitude_q {
12546            let val = buf.get_f32_le()?;
12547            *v = val;
12548        }
12549        for v in &mut __struct.rates {
12550            let val = buf.get_f32_le()?;
12551            *v = val;
12552        }
12553        for v in &mut __struct.position_cov {
12554            let val = buf.get_f32_le()?;
12555            *v = val;
12556        }
12557        __struct.est_capabilities = buf.get_u8()?;
12558        Ok(__struct)
12559    }
12560    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12561        let mut __tmp = BytesMut::new(bytes);
12562        #[allow(clippy::absurd_extreme_comparisons)]
12563        #[allow(unused_comparisons)]
12564        if __tmp.remaining() < Self::ENCODED_LEN {
12565            panic!(
12566                "buffer is too small (need {} bytes, but got {})",
12567                Self::ENCODED_LEN,
12568                __tmp.remaining(),
12569            )
12570        }
12571        __tmp.put_u64_le(self.timestamp);
12572        __tmp.put_u64_le(self.custom_state);
12573        __tmp.put_i32_le(self.lat);
12574        __tmp.put_i32_le(self.lon);
12575        __tmp.put_f32_le(self.alt);
12576        for val in &self.vel {
12577            __tmp.put_f32_le(*val);
12578        }
12579        for val in &self.acc {
12580            __tmp.put_f32_le(*val);
12581        }
12582        for val in &self.attitude_q {
12583            __tmp.put_f32_le(*val);
12584        }
12585        for val in &self.rates {
12586            __tmp.put_f32_le(*val);
12587        }
12588        for val in &self.position_cov {
12589            __tmp.put_f32_le(*val);
12590        }
12591        __tmp.put_u8(self.est_capabilities);
12592        if matches!(version, MavlinkVersion::V2) {
12593            let len = __tmp.len();
12594            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12595        } else {
12596            __tmp.len()
12597        }
12598    }
12599}
12600#[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
12601#[doc = ""]
12602#[doc = "ID: 371"]
12603#[derive(Debug, Clone, PartialEq)]
12604#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12605#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12606#[cfg_attr(feature = "ts", derive(TS))]
12607#[cfg_attr(feature = "ts", ts(export))]
12608pub struct FUEL_STATUS_DATA {
12609    #[doc = "Capacity when full. Must be provided."]
12610    pub maximum_fuel: f32,
12611    #[doc = "Consumed fuel (measured). This value should not be inferred: if not measured set to NaN. NaN: field not provided."]
12612    pub consumed_fuel: f32,
12613    #[doc = "Remaining fuel until empty (measured). The value should not be inferred: if not measured set to NaN. NaN: field not provided."]
12614    pub remaining_fuel: f32,
12615    #[doc = "Positive value when emptying/using, and negative if filling/replacing. NaN: field not provided."]
12616    pub flow_rate: f32,
12617    #[doc = "Fuel temperature. NaN: field not provided."]
12618    pub temperature: f32,
12619    #[doc = "Fuel type. Defines units for fuel capacity and consumption fields above."]
12620    pub fuel_type: MavFuelType,
12621    #[doc = "Fuel ID. Must match ID of other messages for same fuel system, such as BATTERY_STATUS_V2."]
12622    pub id: u8,
12623    #[doc = "Percentage of remaining fuel, relative to full. Values: [0-100], UINT8_MAX: field not provided."]
12624    pub percent_remaining: u8,
12625}
12626impl FUEL_STATUS_DATA {
12627    pub const ENCODED_LEN: usize = 26usize;
12628    pub const DEFAULT: Self = Self {
12629        maximum_fuel: 0.0_f32,
12630        consumed_fuel: 0.0_f32,
12631        remaining_fuel: 0.0_f32,
12632        flow_rate: 0.0_f32,
12633        temperature: 0.0_f32,
12634        fuel_type: MavFuelType::DEFAULT,
12635        id: 0_u8,
12636        percent_remaining: 0_u8,
12637    };
12638    #[cfg(feature = "arbitrary")]
12639    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12640        use arbitrary::{Arbitrary, Unstructured};
12641        let mut buf = [0u8; 1024];
12642        rng.fill_bytes(&mut buf);
12643        let mut unstructured = Unstructured::new(&buf);
12644        Self::arbitrary(&mut unstructured).unwrap_or_default()
12645    }
12646}
12647impl Default for FUEL_STATUS_DATA {
12648    fn default() -> Self {
12649        Self::DEFAULT.clone()
12650    }
12651}
12652impl MessageData for FUEL_STATUS_DATA {
12653    type Message = MavMessage;
12654    const ID: u32 = 371u32;
12655    const NAME: &'static str = "FUEL_STATUS";
12656    const EXTRA_CRC: u8 = 10u8;
12657    const ENCODED_LEN: usize = 26usize;
12658    fn deser(
12659        _version: MavlinkVersion,
12660        __input: &[u8],
12661    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12662        let avail_len = __input.len();
12663        let mut payload_buf = [0; Self::ENCODED_LEN];
12664        let mut buf = if avail_len < Self::ENCODED_LEN {
12665            payload_buf[0..avail_len].copy_from_slice(__input);
12666            Bytes::new(&payload_buf)
12667        } else {
12668            Bytes::new(__input)
12669        };
12670        let mut __struct = Self::default();
12671        __struct.maximum_fuel = buf.get_f32_le()?;
12672        __struct.consumed_fuel = buf.get_f32_le()?;
12673        __struct.remaining_fuel = buf.get_f32_le()?;
12674        __struct.flow_rate = buf.get_f32_le()?;
12675        __struct.temperature = buf.get_f32_le()?;
12676        let tmp = buf.get_u32_le()?;
12677        __struct.fuel_type = FromPrimitive::from_u32(tmp).ok_or(
12678            ::mavlink_core::error::ParserError::InvalidEnum {
12679                enum_type: "MavFuelType",
12680                value: tmp as u64,
12681            },
12682        )?;
12683        __struct.id = buf.get_u8()?;
12684        __struct.percent_remaining = buf.get_u8()?;
12685        Ok(__struct)
12686    }
12687    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12688        let mut __tmp = BytesMut::new(bytes);
12689        #[allow(clippy::absurd_extreme_comparisons)]
12690        #[allow(unused_comparisons)]
12691        if __tmp.remaining() < Self::ENCODED_LEN {
12692            panic!(
12693                "buffer is too small (need {} bytes, but got {})",
12694                Self::ENCODED_LEN,
12695                __tmp.remaining(),
12696            )
12697        }
12698        __tmp.put_f32_le(self.maximum_fuel);
12699        __tmp.put_f32_le(self.consumed_fuel);
12700        __tmp.put_f32_le(self.remaining_fuel);
12701        __tmp.put_f32_le(self.flow_rate);
12702        __tmp.put_f32_le(self.temperature);
12703        __tmp.put_u32_le(self.fuel_type as u32);
12704        __tmp.put_u8(self.id);
12705        __tmp.put_u8(self.percent_remaining);
12706        if matches!(version, MavlinkVersion::V2) {
12707            let len = __tmp.len();
12708            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12709        } else {
12710            __tmp.len()
12711        }
12712    }
12713}
12714#[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
12715#[doc = ""]
12716#[doc = "ID: 373"]
12717#[derive(Debug, Clone, PartialEq)]
12718#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12719#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12720#[cfg_attr(feature = "ts", derive(TS))]
12721#[cfg_attr(feature = "ts", ts(export))]
12722pub struct GENERATOR_STATUS_DATA {
12723    #[doc = "Status flags."]
12724    pub status: MavGeneratorStatusFlag,
12725    #[doc = "Current into/out of battery. Positive for out. Negative for in. NaN: field not provided."]
12726    pub battery_current: f32,
12727    #[doc = "Current going to the UAV. If battery current not available this is the DC current from the generator. Positive for out. Negative for in. NaN: field not provided"]
12728    pub load_current: f32,
12729    #[doc = "The power being generated. NaN: field not provided"]
12730    pub power_generated: f32,
12731    #[doc = "Voltage of the bus seen at the generator, or battery bus if battery bus is controlled by generator and at a different voltage to main bus."]
12732    pub bus_voltage: f32,
12733    #[doc = "The target battery current. Positive for out. Negative for in. NaN: field not provided"]
12734    pub bat_current_setpoint: f32,
12735    #[doc = "Seconds this generator has run since it was rebooted. UINT32_MAX: field not provided."]
12736    pub runtime: u32,
12737    #[doc = "Seconds until this generator requires maintenance.  A negative value indicates maintenance is past-due. INT32_MAX: field not provided."]
12738    pub time_until_maintenance: i32,
12739    #[doc = "Speed of electrical generator or alternator. UINT16_MAX: field not provided."]
12740    pub generator_speed: u16,
12741    #[doc = "The temperature of the rectifier or power converter. INT16_MAX: field not provided."]
12742    pub rectifier_temperature: i16,
12743    #[doc = "The temperature of the mechanical motor, fuel cell core or generator. INT16_MAX: field not provided."]
12744    pub generator_temperature: i16,
12745}
12746impl GENERATOR_STATUS_DATA {
12747    pub const ENCODED_LEN: usize = 42usize;
12748    pub const DEFAULT: Self = Self {
12749        status: MavGeneratorStatusFlag::DEFAULT,
12750        battery_current: 0.0_f32,
12751        load_current: 0.0_f32,
12752        power_generated: 0.0_f32,
12753        bus_voltage: 0.0_f32,
12754        bat_current_setpoint: 0.0_f32,
12755        runtime: 0_u32,
12756        time_until_maintenance: 0_i32,
12757        generator_speed: 0_u16,
12758        rectifier_temperature: 0_i16,
12759        generator_temperature: 0_i16,
12760    };
12761    #[cfg(feature = "arbitrary")]
12762    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12763        use arbitrary::{Arbitrary, Unstructured};
12764        let mut buf = [0u8; 1024];
12765        rng.fill_bytes(&mut buf);
12766        let mut unstructured = Unstructured::new(&buf);
12767        Self::arbitrary(&mut unstructured).unwrap_or_default()
12768    }
12769}
12770impl Default for GENERATOR_STATUS_DATA {
12771    fn default() -> Self {
12772        Self::DEFAULT.clone()
12773    }
12774}
12775impl MessageData for GENERATOR_STATUS_DATA {
12776    type Message = MavMessage;
12777    const ID: u32 = 373u32;
12778    const NAME: &'static str = "GENERATOR_STATUS";
12779    const EXTRA_CRC: u8 = 117u8;
12780    const ENCODED_LEN: usize = 42usize;
12781    fn deser(
12782        _version: MavlinkVersion,
12783        __input: &[u8],
12784    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12785        let avail_len = __input.len();
12786        let mut payload_buf = [0; Self::ENCODED_LEN];
12787        let mut buf = if avail_len < Self::ENCODED_LEN {
12788            payload_buf[0..avail_len].copy_from_slice(__input);
12789            Bytes::new(&payload_buf)
12790        } else {
12791            Bytes::new(__input)
12792        };
12793        let mut __struct = Self::default();
12794        let tmp = buf.get_u64_le()?;
12795        __struct.status =
12796            MavGeneratorStatusFlag::from_bits(tmp as <MavGeneratorStatusFlag as Flags>::Bits)
12797                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12798                    flag_type: "MavGeneratorStatusFlag",
12799                    value: tmp as u64,
12800                })?;
12801        __struct.battery_current = buf.get_f32_le()?;
12802        __struct.load_current = buf.get_f32_le()?;
12803        __struct.power_generated = buf.get_f32_le()?;
12804        __struct.bus_voltage = buf.get_f32_le()?;
12805        __struct.bat_current_setpoint = buf.get_f32_le()?;
12806        __struct.runtime = buf.get_u32_le()?;
12807        __struct.time_until_maintenance = buf.get_i32_le()?;
12808        __struct.generator_speed = buf.get_u16_le()?;
12809        __struct.rectifier_temperature = buf.get_i16_le()?;
12810        __struct.generator_temperature = buf.get_i16_le()?;
12811        Ok(__struct)
12812    }
12813    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12814        let mut __tmp = BytesMut::new(bytes);
12815        #[allow(clippy::absurd_extreme_comparisons)]
12816        #[allow(unused_comparisons)]
12817        if __tmp.remaining() < Self::ENCODED_LEN {
12818            panic!(
12819                "buffer is too small (need {} bytes, but got {})",
12820                Self::ENCODED_LEN,
12821                __tmp.remaining(),
12822            )
12823        }
12824        __tmp.put_u64_le(self.status.bits() as u64);
12825        __tmp.put_f32_le(self.battery_current);
12826        __tmp.put_f32_le(self.load_current);
12827        __tmp.put_f32_le(self.power_generated);
12828        __tmp.put_f32_le(self.bus_voltage);
12829        __tmp.put_f32_le(self.bat_current_setpoint);
12830        __tmp.put_u32_le(self.runtime);
12831        __tmp.put_i32_le(self.time_until_maintenance);
12832        __tmp.put_u16_le(self.generator_speed);
12833        __tmp.put_i16_le(self.rectifier_temperature);
12834        __tmp.put_i16_le(self.generator_temperature);
12835        if matches!(version, MavlinkVersion::V2) {
12836            let len = __tmp.len();
12837            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12838        } else {
12839            __tmp.len()
12840        }
12841    }
12842}
12843#[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
12844#[doc = ""]
12845#[doc = "ID: 285"]
12846#[derive(Debug, Clone, PartialEq)]
12847#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12848#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12849#[cfg_attr(feature = "ts", derive(TS))]
12850#[cfg_attr(feature = "ts", ts(export))]
12851pub struct GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12852    #[doc = "Timestamp (time since system boot)."]
12853    pub time_boot_ms: u32,
12854    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description."]
12855    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12856    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
12857    pub q: [f32; 4],
12858    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN if unknown."]
12859    pub angular_velocity_x: f32,
12860    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN if unknown."]
12861    pub angular_velocity_y: f32,
12862    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN if unknown."]
12863    pub angular_velocity_z: f32,
12864    #[doc = "Failure flags (0 for no failure)"]
12865    pub failure_flags: GimbalDeviceErrorFlags,
12866    #[doc = "Current gimbal flags set."]
12867    pub flags: GimbalDeviceFlags,
12868    #[doc = "System ID"]
12869    pub target_system: u8,
12870    #[doc = "Component ID"]
12871    pub target_component: u8,
12872    #[doc = "Yaw angle relating the quaternions in earth and body frames (see message description). NaN if unknown."]
12873    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12874    pub delta_yaw: f32,
12875    #[doc = "Yaw angular velocity relating the angular velocities in earth and body frames (see message description). NaN if unknown."]
12876    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12877    pub delta_yaw_velocity: f32,
12878    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
12879    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12880    pub gimbal_device_id: u8,
12881}
12882impl GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12883    pub const ENCODED_LEN: usize = 49usize;
12884    pub const DEFAULT: Self = Self {
12885        time_boot_ms: 0_u32,
12886        q: [0.0_f32; 4usize],
12887        angular_velocity_x: 0.0_f32,
12888        angular_velocity_y: 0.0_f32,
12889        angular_velocity_z: 0.0_f32,
12890        failure_flags: GimbalDeviceErrorFlags::DEFAULT,
12891        flags: GimbalDeviceFlags::DEFAULT,
12892        target_system: 0_u8,
12893        target_component: 0_u8,
12894        delta_yaw: 0.0_f32,
12895        delta_yaw_velocity: 0.0_f32,
12896        gimbal_device_id: 0_u8,
12897    };
12898    #[cfg(feature = "arbitrary")]
12899    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12900        use arbitrary::{Arbitrary, Unstructured};
12901        let mut buf = [0u8; 1024];
12902        rng.fill_bytes(&mut buf);
12903        let mut unstructured = Unstructured::new(&buf);
12904        Self::arbitrary(&mut unstructured).unwrap_or_default()
12905    }
12906}
12907impl Default for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12908    fn default() -> Self {
12909        Self::DEFAULT.clone()
12910    }
12911}
12912impl MessageData for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12913    type Message = MavMessage;
12914    const ID: u32 = 285u32;
12915    const NAME: &'static str = "GIMBAL_DEVICE_ATTITUDE_STATUS";
12916    const EXTRA_CRC: u8 = 137u8;
12917    const ENCODED_LEN: usize = 49usize;
12918    fn deser(
12919        _version: MavlinkVersion,
12920        __input: &[u8],
12921    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12922        let avail_len = __input.len();
12923        let mut payload_buf = [0; Self::ENCODED_LEN];
12924        let mut buf = if avail_len < Self::ENCODED_LEN {
12925            payload_buf[0..avail_len].copy_from_slice(__input);
12926            Bytes::new(&payload_buf)
12927        } else {
12928            Bytes::new(__input)
12929        };
12930        let mut __struct = Self::default();
12931        __struct.time_boot_ms = buf.get_u32_le()?;
12932        for v in &mut __struct.q {
12933            let val = buf.get_f32_le()?;
12934            *v = val;
12935        }
12936        __struct.angular_velocity_x = buf.get_f32_le()?;
12937        __struct.angular_velocity_y = buf.get_f32_le()?;
12938        __struct.angular_velocity_z = buf.get_f32_le()?;
12939        let tmp = buf.get_u32_le()?;
12940        __struct.failure_flags =
12941            GimbalDeviceErrorFlags::from_bits(tmp as <GimbalDeviceErrorFlags as Flags>::Bits)
12942                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12943                    flag_type: "GimbalDeviceErrorFlags",
12944                    value: tmp as u64,
12945                })?;
12946        let tmp = buf.get_u16_le()?;
12947        __struct.flags = GimbalDeviceFlags::from_bits(tmp as <GimbalDeviceFlags as Flags>::Bits)
12948            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12949                flag_type: "GimbalDeviceFlags",
12950                value: tmp as u64,
12951            })?;
12952        __struct.target_system = buf.get_u8()?;
12953        __struct.target_component = buf.get_u8()?;
12954        __struct.delta_yaw = buf.get_f32_le()?;
12955        __struct.delta_yaw_velocity = buf.get_f32_le()?;
12956        __struct.gimbal_device_id = buf.get_u8()?;
12957        Ok(__struct)
12958    }
12959    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12960        let mut __tmp = BytesMut::new(bytes);
12961        #[allow(clippy::absurd_extreme_comparisons)]
12962        #[allow(unused_comparisons)]
12963        if __tmp.remaining() < Self::ENCODED_LEN {
12964            panic!(
12965                "buffer is too small (need {} bytes, but got {})",
12966                Self::ENCODED_LEN,
12967                __tmp.remaining(),
12968            )
12969        }
12970        __tmp.put_u32_le(self.time_boot_ms);
12971        for val in &self.q {
12972            __tmp.put_f32_le(*val);
12973        }
12974        __tmp.put_f32_le(self.angular_velocity_x);
12975        __tmp.put_f32_le(self.angular_velocity_y);
12976        __tmp.put_f32_le(self.angular_velocity_z);
12977        __tmp.put_u32_le(self.failure_flags.bits() as u32);
12978        __tmp.put_u16_le(self.flags.bits() as u16);
12979        __tmp.put_u8(self.target_system);
12980        __tmp.put_u8(self.target_component);
12981        if matches!(version, MavlinkVersion::V2) {
12982            __tmp.put_f32_le(self.delta_yaw);
12983            __tmp.put_f32_le(self.delta_yaw_velocity);
12984            __tmp.put_u8(self.gimbal_device_id);
12985            let len = __tmp.len();
12986            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12987        } else {
12988            __tmp.len()
12989        }
12990    }
12991}
12992#[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
12993#[doc = ""]
12994#[doc = "ID: 283"]
12995#[derive(Debug, Clone, PartialEq)]
12996#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12997#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12998#[cfg_attr(feature = "ts", derive(TS))]
12999#[cfg_attr(feature = "ts", ts(export))]
13000pub struct GIMBAL_DEVICE_INFORMATION_DATA {
13001    #[doc = "UID of gimbal hardware (0 if unknown)."]
13002    pub uid: u64,
13003    #[doc = "Timestamp (time since system boot)."]
13004    pub time_boot_ms: u32,
13005    #[doc = "0xff)."]
13006    pub firmware_version: u32,
13007    #[doc = "0xff)."]
13008    pub hardware_version: u32,
13009    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
13010    pub roll_min: f32,
13011    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
13012    pub roll_max: f32,
13013    #[doc = "Minimum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
13014    pub pitch_min: f32,
13015    #[doc = "Maximum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
13016    pub pitch_max: f32,
13017    #[doc = "Minimum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
13018    pub yaw_min: f32,
13019    #[doc = "Maximum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
13020    pub yaw_max: f32,
13021    #[doc = "Bitmap of gimbal capability flags."]
13022    pub cap_flags: GimbalDeviceCapFlags,
13023    #[doc = "Bitmap for use for gimbal-specific capability flags."]
13024    pub custom_cap_flags: u16,
13025    #[doc = "Name of the gimbal vendor."]
13026    #[cfg_attr(feature = "ts", ts(type = "string"))]
13027    pub vendor_name: CharArray<32>,
13028    #[doc = "Name of the gimbal model."]
13029    #[cfg_attr(feature = "ts", ts(type = "string"))]
13030    pub model_name: CharArray<32>,
13031    #[doc = "Custom name of the gimbal given to it by the user."]
13032    #[cfg_attr(feature = "ts", ts(type = "string"))]
13033    pub custom_name: CharArray<32>,
13034    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set to a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
13035    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13036    pub gimbal_device_id: u8,
13037}
13038impl GIMBAL_DEVICE_INFORMATION_DATA {
13039    pub const ENCODED_LEN: usize = 145usize;
13040    pub const DEFAULT: Self = Self {
13041        uid: 0_u64,
13042        time_boot_ms: 0_u32,
13043        firmware_version: 0_u32,
13044        hardware_version: 0_u32,
13045        roll_min: 0.0_f32,
13046        roll_max: 0.0_f32,
13047        pitch_min: 0.0_f32,
13048        pitch_max: 0.0_f32,
13049        yaw_min: 0.0_f32,
13050        yaw_max: 0.0_f32,
13051        cap_flags: GimbalDeviceCapFlags::DEFAULT,
13052        custom_cap_flags: 0_u16,
13053        vendor_name: CharArray::new([0_u8; 32usize]),
13054        model_name: CharArray::new([0_u8; 32usize]),
13055        custom_name: CharArray::new([0_u8; 32usize]),
13056        gimbal_device_id: 0_u8,
13057    };
13058    #[cfg(feature = "arbitrary")]
13059    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13060        use arbitrary::{Arbitrary, Unstructured};
13061        let mut buf = [0u8; 1024];
13062        rng.fill_bytes(&mut buf);
13063        let mut unstructured = Unstructured::new(&buf);
13064        Self::arbitrary(&mut unstructured).unwrap_or_default()
13065    }
13066}
13067impl Default for GIMBAL_DEVICE_INFORMATION_DATA {
13068    fn default() -> Self {
13069        Self::DEFAULT.clone()
13070    }
13071}
13072impl MessageData for GIMBAL_DEVICE_INFORMATION_DATA {
13073    type Message = MavMessage;
13074    const ID: u32 = 283u32;
13075    const NAME: &'static str = "GIMBAL_DEVICE_INFORMATION";
13076    const EXTRA_CRC: u8 = 74u8;
13077    const ENCODED_LEN: usize = 145usize;
13078    fn deser(
13079        _version: MavlinkVersion,
13080        __input: &[u8],
13081    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13082        let avail_len = __input.len();
13083        let mut payload_buf = [0; Self::ENCODED_LEN];
13084        let mut buf = if avail_len < Self::ENCODED_LEN {
13085            payload_buf[0..avail_len].copy_from_slice(__input);
13086            Bytes::new(&payload_buf)
13087        } else {
13088            Bytes::new(__input)
13089        };
13090        let mut __struct = Self::default();
13091        __struct.uid = buf.get_u64_le()?;
13092        __struct.time_boot_ms = buf.get_u32_le()?;
13093        __struct.firmware_version = buf.get_u32_le()?;
13094        __struct.hardware_version = buf.get_u32_le()?;
13095        __struct.roll_min = buf.get_f32_le()?;
13096        __struct.roll_max = buf.get_f32_le()?;
13097        __struct.pitch_min = buf.get_f32_le()?;
13098        __struct.pitch_max = buf.get_f32_le()?;
13099        __struct.yaw_min = buf.get_f32_le()?;
13100        __struct.yaw_max = buf.get_f32_le()?;
13101        let tmp = buf.get_u16_le()?;
13102        __struct.cap_flags = GimbalDeviceCapFlags::from_bits(
13103            tmp as <GimbalDeviceCapFlags as Flags>::Bits,
13104        )
13105        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13106            flag_type: "GimbalDeviceCapFlags",
13107            value: tmp as u64,
13108        })?;
13109        __struct.custom_cap_flags = buf.get_u16_le()?;
13110        let mut tmp = [0_u8; 32usize];
13111        for v in &mut tmp {
13112            *v = buf.get_u8()?;
13113        }
13114        __struct.vendor_name = CharArray::new(tmp);
13115        let mut tmp = [0_u8; 32usize];
13116        for v in &mut tmp {
13117            *v = buf.get_u8()?;
13118        }
13119        __struct.model_name = CharArray::new(tmp);
13120        let mut tmp = [0_u8; 32usize];
13121        for v in &mut tmp {
13122            *v = buf.get_u8()?;
13123        }
13124        __struct.custom_name = CharArray::new(tmp);
13125        __struct.gimbal_device_id = buf.get_u8()?;
13126        Ok(__struct)
13127    }
13128    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13129        let mut __tmp = BytesMut::new(bytes);
13130        #[allow(clippy::absurd_extreme_comparisons)]
13131        #[allow(unused_comparisons)]
13132        if __tmp.remaining() < Self::ENCODED_LEN {
13133            panic!(
13134                "buffer is too small (need {} bytes, but got {})",
13135                Self::ENCODED_LEN,
13136                __tmp.remaining(),
13137            )
13138        }
13139        __tmp.put_u64_le(self.uid);
13140        __tmp.put_u32_le(self.time_boot_ms);
13141        __tmp.put_u32_le(self.firmware_version);
13142        __tmp.put_u32_le(self.hardware_version);
13143        __tmp.put_f32_le(self.roll_min);
13144        __tmp.put_f32_le(self.roll_max);
13145        __tmp.put_f32_le(self.pitch_min);
13146        __tmp.put_f32_le(self.pitch_max);
13147        __tmp.put_f32_le(self.yaw_min);
13148        __tmp.put_f32_le(self.yaw_max);
13149        __tmp.put_u16_le(self.cap_flags.bits() as u16);
13150        __tmp.put_u16_le(self.custom_cap_flags);
13151        for val in &self.vendor_name {
13152            __tmp.put_u8(*val);
13153        }
13154        for val in &self.model_name {
13155            __tmp.put_u8(*val);
13156        }
13157        for val in &self.custom_name {
13158            __tmp.put_u8(*val);
13159        }
13160        if matches!(version, MavlinkVersion::V2) {
13161            __tmp.put_u8(self.gimbal_device_id);
13162            let len = __tmp.len();
13163            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13164        } else {
13165            __tmp.len()
13166        }
13167    }
13168}
13169#[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
13170#[doc = ""]
13171#[doc = "ID: 284"]
13172#[derive(Debug, Clone, PartialEq)]
13173#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13174#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13175#[cfg_attr(feature = "ts", derive(TS))]
13176#[cfg_attr(feature = "ts", ts(export))]
13177pub struct GIMBAL_DEVICE_SET_ATTITUDE_DATA {
13178    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description. Set fields to NaN to be ignored."]
13179    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13180    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13181    pub q: [f32; 4],
13182    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN to be ignored."]
13183    pub angular_velocity_x: f32,
13184    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN to be ignored."]
13185    pub angular_velocity_y: f32,
13186    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN to be ignored."]
13187    pub angular_velocity_z: f32,
13188    #[doc = "Low level gimbal flags."]
13189    pub flags: GimbalDeviceFlags,
13190    #[doc = "System ID"]
13191    pub target_system: u8,
13192    #[doc = "Component ID"]
13193    pub target_component: u8,
13194}
13195impl GIMBAL_DEVICE_SET_ATTITUDE_DATA {
13196    pub const ENCODED_LEN: usize = 32usize;
13197    pub const DEFAULT: Self = Self {
13198        q: [0.0_f32; 4usize],
13199        angular_velocity_x: 0.0_f32,
13200        angular_velocity_y: 0.0_f32,
13201        angular_velocity_z: 0.0_f32,
13202        flags: GimbalDeviceFlags::DEFAULT,
13203        target_system: 0_u8,
13204        target_component: 0_u8,
13205    };
13206    #[cfg(feature = "arbitrary")]
13207    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13208        use arbitrary::{Arbitrary, Unstructured};
13209        let mut buf = [0u8; 1024];
13210        rng.fill_bytes(&mut buf);
13211        let mut unstructured = Unstructured::new(&buf);
13212        Self::arbitrary(&mut unstructured).unwrap_or_default()
13213    }
13214}
13215impl Default for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
13216    fn default() -> Self {
13217        Self::DEFAULT.clone()
13218    }
13219}
13220impl MessageData for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
13221    type Message = MavMessage;
13222    const ID: u32 = 284u32;
13223    const NAME: &'static str = "GIMBAL_DEVICE_SET_ATTITUDE";
13224    const EXTRA_CRC: u8 = 99u8;
13225    const ENCODED_LEN: usize = 32usize;
13226    fn deser(
13227        _version: MavlinkVersion,
13228        __input: &[u8],
13229    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13230        let avail_len = __input.len();
13231        let mut payload_buf = [0; Self::ENCODED_LEN];
13232        let mut buf = if avail_len < Self::ENCODED_LEN {
13233            payload_buf[0..avail_len].copy_from_slice(__input);
13234            Bytes::new(&payload_buf)
13235        } else {
13236            Bytes::new(__input)
13237        };
13238        let mut __struct = Self::default();
13239        for v in &mut __struct.q {
13240            let val = buf.get_f32_le()?;
13241            *v = val;
13242        }
13243        __struct.angular_velocity_x = buf.get_f32_le()?;
13244        __struct.angular_velocity_y = buf.get_f32_le()?;
13245        __struct.angular_velocity_z = buf.get_f32_le()?;
13246        let tmp = buf.get_u16_le()?;
13247        __struct.flags = GimbalDeviceFlags::from_bits(tmp as <GimbalDeviceFlags as Flags>::Bits)
13248            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13249                flag_type: "GimbalDeviceFlags",
13250                value: tmp as u64,
13251            })?;
13252        __struct.target_system = buf.get_u8()?;
13253        __struct.target_component = buf.get_u8()?;
13254        Ok(__struct)
13255    }
13256    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13257        let mut __tmp = BytesMut::new(bytes);
13258        #[allow(clippy::absurd_extreme_comparisons)]
13259        #[allow(unused_comparisons)]
13260        if __tmp.remaining() < Self::ENCODED_LEN {
13261            panic!(
13262                "buffer is too small (need {} bytes, but got {})",
13263                Self::ENCODED_LEN,
13264                __tmp.remaining(),
13265            )
13266        }
13267        for val in &self.q {
13268            __tmp.put_f32_le(*val);
13269        }
13270        __tmp.put_f32_le(self.angular_velocity_x);
13271        __tmp.put_f32_le(self.angular_velocity_y);
13272        __tmp.put_f32_le(self.angular_velocity_z);
13273        __tmp.put_u16_le(self.flags.bits() as u16);
13274        __tmp.put_u8(self.target_system);
13275        __tmp.put_u8(self.target_component);
13276        if matches!(version, MavlinkVersion::V2) {
13277            let len = __tmp.len();
13278            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13279        } else {
13280            __tmp.len()
13281        }
13282    }
13283}
13284#[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
13285#[doc = ""]
13286#[doc = "ID: 280"]
13287#[derive(Debug, Clone, PartialEq)]
13288#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13289#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13290#[cfg_attr(feature = "ts", derive(TS))]
13291#[cfg_attr(feature = "ts", ts(export))]
13292pub struct GIMBAL_MANAGER_INFORMATION_DATA {
13293    #[doc = "Timestamp (time since system boot)."]
13294    pub time_boot_ms: u32,
13295    #[doc = "Bitmap of gimbal capability flags."]
13296    pub cap_flags: GimbalManagerCapFlags,
13297    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
13298    pub roll_min: f32,
13299    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
13300    pub roll_max: f32,
13301    #[doc = "Minimum pitch angle (positive: up, negative: down)"]
13302    pub pitch_min: f32,
13303    #[doc = "Maximum pitch angle (positive: up, negative: down)"]
13304    pub pitch_max: f32,
13305    #[doc = "Minimum yaw angle (positive: to the right, negative: to the left)"]
13306    pub yaw_min: f32,
13307    #[doc = "Maximum yaw angle (positive: to the right, negative: to the left)"]
13308    pub yaw_max: f32,
13309    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
13310    pub gimbal_device_id: u8,
13311}
13312impl GIMBAL_MANAGER_INFORMATION_DATA {
13313    pub const ENCODED_LEN: usize = 33usize;
13314    pub const DEFAULT: Self = Self {
13315        time_boot_ms: 0_u32,
13316        cap_flags: GimbalManagerCapFlags::DEFAULT,
13317        roll_min: 0.0_f32,
13318        roll_max: 0.0_f32,
13319        pitch_min: 0.0_f32,
13320        pitch_max: 0.0_f32,
13321        yaw_min: 0.0_f32,
13322        yaw_max: 0.0_f32,
13323        gimbal_device_id: 0_u8,
13324    };
13325    #[cfg(feature = "arbitrary")]
13326    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13327        use arbitrary::{Arbitrary, Unstructured};
13328        let mut buf = [0u8; 1024];
13329        rng.fill_bytes(&mut buf);
13330        let mut unstructured = Unstructured::new(&buf);
13331        Self::arbitrary(&mut unstructured).unwrap_or_default()
13332    }
13333}
13334impl Default for GIMBAL_MANAGER_INFORMATION_DATA {
13335    fn default() -> Self {
13336        Self::DEFAULT.clone()
13337    }
13338}
13339impl MessageData for GIMBAL_MANAGER_INFORMATION_DATA {
13340    type Message = MavMessage;
13341    const ID: u32 = 280u32;
13342    const NAME: &'static str = "GIMBAL_MANAGER_INFORMATION";
13343    const EXTRA_CRC: u8 = 70u8;
13344    const ENCODED_LEN: usize = 33usize;
13345    fn deser(
13346        _version: MavlinkVersion,
13347        __input: &[u8],
13348    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13349        let avail_len = __input.len();
13350        let mut payload_buf = [0; Self::ENCODED_LEN];
13351        let mut buf = if avail_len < Self::ENCODED_LEN {
13352            payload_buf[0..avail_len].copy_from_slice(__input);
13353            Bytes::new(&payload_buf)
13354        } else {
13355            Bytes::new(__input)
13356        };
13357        let mut __struct = Self::default();
13358        __struct.time_boot_ms = buf.get_u32_le()?;
13359        let tmp = buf.get_u32_le()?;
13360        __struct.cap_flags = GimbalManagerCapFlags::from_bits(
13361            tmp as <GimbalManagerCapFlags as Flags>::Bits,
13362        )
13363        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13364            flag_type: "GimbalManagerCapFlags",
13365            value: tmp as u64,
13366        })?;
13367        __struct.roll_min = buf.get_f32_le()?;
13368        __struct.roll_max = buf.get_f32_le()?;
13369        __struct.pitch_min = buf.get_f32_le()?;
13370        __struct.pitch_max = buf.get_f32_le()?;
13371        __struct.yaw_min = buf.get_f32_le()?;
13372        __struct.yaw_max = buf.get_f32_le()?;
13373        __struct.gimbal_device_id = buf.get_u8()?;
13374        Ok(__struct)
13375    }
13376    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13377        let mut __tmp = BytesMut::new(bytes);
13378        #[allow(clippy::absurd_extreme_comparisons)]
13379        #[allow(unused_comparisons)]
13380        if __tmp.remaining() < Self::ENCODED_LEN {
13381            panic!(
13382                "buffer is too small (need {} bytes, but got {})",
13383                Self::ENCODED_LEN,
13384                __tmp.remaining(),
13385            )
13386        }
13387        __tmp.put_u32_le(self.time_boot_ms);
13388        __tmp.put_u32_le(self.cap_flags.bits() as u32);
13389        __tmp.put_f32_le(self.roll_min);
13390        __tmp.put_f32_le(self.roll_max);
13391        __tmp.put_f32_le(self.pitch_min);
13392        __tmp.put_f32_le(self.pitch_max);
13393        __tmp.put_f32_le(self.yaw_min);
13394        __tmp.put_f32_le(self.yaw_max);
13395        __tmp.put_u8(self.gimbal_device_id);
13396        if matches!(version, MavlinkVersion::V2) {
13397            let len = __tmp.len();
13398            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13399        } else {
13400            __tmp.len()
13401        }
13402    }
13403}
13404#[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
13405#[doc = ""]
13406#[doc = "ID: 282"]
13407#[derive(Debug, Clone, PartialEq)]
13408#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13409#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13410#[cfg_attr(feature = "ts", derive(TS))]
13411#[cfg_attr(feature = "ts", ts(export))]
13412pub struct GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13413    #[doc = "High level gimbal manager flags to use."]
13414    pub flags: GimbalManagerFlags,
13415    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation, the frame is depends on whether the flag GIMBAL_MANAGER_FLAGS_YAW_LOCK is set)"]
13416    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13417    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13418    pub q: [f32; 4],
13419    #[doc = "X component of angular velocity, positive is rolling to the right, NaN to be ignored."]
13420    pub angular_velocity_x: f32,
13421    #[doc = "Y component of angular velocity, positive is pitching up, NaN to be ignored."]
13422    pub angular_velocity_y: f32,
13423    #[doc = "Z component of angular velocity, positive is yawing to the right, NaN to be ignored."]
13424    pub angular_velocity_z: f32,
13425    #[doc = "System ID"]
13426    pub target_system: u8,
13427    #[doc = "Component ID"]
13428    pub target_component: u8,
13429    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
13430    pub gimbal_device_id: u8,
13431}
13432impl GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13433    pub const ENCODED_LEN: usize = 35usize;
13434    pub const DEFAULT: Self = Self {
13435        flags: GimbalManagerFlags::DEFAULT,
13436        q: [0.0_f32; 4usize],
13437        angular_velocity_x: 0.0_f32,
13438        angular_velocity_y: 0.0_f32,
13439        angular_velocity_z: 0.0_f32,
13440        target_system: 0_u8,
13441        target_component: 0_u8,
13442        gimbal_device_id: 0_u8,
13443    };
13444    #[cfg(feature = "arbitrary")]
13445    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13446        use arbitrary::{Arbitrary, Unstructured};
13447        let mut buf = [0u8; 1024];
13448        rng.fill_bytes(&mut buf);
13449        let mut unstructured = Unstructured::new(&buf);
13450        Self::arbitrary(&mut unstructured).unwrap_or_default()
13451    }
13452}
13453impl Default for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13454    fn default() -> Self {
13455        Self::DEFAULT.clone()
13456    }
13457}
13458impl MessageData for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13459    type Message = MavMessage;
13460    const ID: u32 = 282u32;
13461    const NAME: &'static str = "GIMBAL_MANAGER_SET_ATTITUDE";
13462    const EXTRA_CRC: u8 = 123u8;
13463    const ENCODED_LEN: usize = 35usize;
13464    fn deser(
13465        _version: MavlinkVersion,
13466        __input: &[u8],
13467    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13468        let avail_len = __input.len();
13469        let mut payload_buf = [0; Self::ENCODED_LEN];
13470        let mut buf = if avail_len < Self::ENCODED_LEN {
13471            payload_buf[0..avail_len].copy_from_slice(__input);
13472            Bytes::new(&payload_buf)
13473        } else {
13474            Bytes::new(__input)
13475        };
13476        let mut __struct = Self::default();
13477        let tmp = buf.get_u32_le()?;
13478        __struct.flags = GimbalManagerFlags::from_bits(tmp as <GimbalManagerFlags as Flags>::Bits)
13479            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13480                flag_type: "GimbalManagerFlags",
13481                value: tmp as u64,
13482            })?;
13483        for v in &mut __struct.q {
13484            let val = buf.get_f32_le()?;
13485            *v = val;
13486        }
13487        __struct.angular_velocity_x = buf.get_f32_le()?;
13488        __struct.angular_velocity_y = buf.get_f32_le()?;
13489        __struct.angular_velocity_z = buf.get_f32_le()?;
13490        __struct.target_system = buf.get_u8()?;
13491        __struct.target_component = buf.get_u8()?;
13492        __struct.gimbal_device_id = buf.get_u8()?;
13493        Ok(__struct)
13494    }
13495    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13496        let mut __tmp = BytesMut::new(bytes);
13497        #[allow(clippy::absurd_extreme_comparisons)]
13498        #[allow(unused_comparisons)]
13499        if __tmp.remaining() < Self::ENCODED_LEN {
13500            panic!(
13501                "buffer is too small (need {} bytes, but got {})",
13502                Self::ENCODED_LEN,
13503                __tmp.remaining(),
13504            )
13505        }
13506        __tmp.put_u32_le(self.flags.bits() as u32);
13507        for val in &self.q {
13508            __tmp.put_f32_le(*val);
13509        }
13510        __tmp.put_f32_le(self.angular_velocity_x);
13511        __tmp.put_f32_le(self.angular_velocity_y);
13512        __tmp.put_f32_le(self.angular_velocity_z);
13513        __tmp.put_u8(self.target_system);
13514        __tmp.put_u8(self.target_component);
13515        __tmp.put_u8(self.gimbal_device_id);
13516        if matches!(version, MavlinkVersion::V2) {
13517            let len = __tmp.len();
13518            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13519        } else {
13520            __tmp.len()
13521        }
13522    }
13523}
13524#[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
13525#[doc = ""]
13526#[doc = "ID: 288"]
13527#[derive(Debug, Clone, PartialEq)]
13528#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13529#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13530#[cfg_attr(feature = "ts", derive(TS))]
13531#[cfg_attr(feature = "ts", ts(export))]
13532pub struct GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13533    #[doc = "High level gimbal manager flags."]
13534    pub flags: GimbalManagerFlags,
13535    #[doc = "Pitch angle unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
13536    pub pitch: f32,
13537    #[doc = "Yaw angle unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
13538    pub yaw: f32,
13539    #[doc = "Pitch angular rate unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
13540    pub pitch_rate: f32,
13541    #[doc = "Yaw angular rate unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
13542    pub yaw_rate: f32,
13543    #[doc = "System ID"]
13544    pub target_system: u8,
13545    #[doc = "Component ID"]
13546    pub target_component: u8,
13547    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
13548    pub gimbal_device_id: u8,
13549}
13550impl GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13551    pub const ENCODED_LEN: usize = 23usize;
13552    pub const DEFAULT: Self = Self {
13553        flags: GimbalManagerFlags::DEFAULT,
13554        pitch: 0.0_f32,
13555        yaw: 0.0_f32,
13556        pitch_rate: 0.0_f32,
13557        yaw_rate: 0.0_f32,
13558        target_system: 0_u8,
13559        target_component: 0_u8,
13560        gimbal_device_id: 0_u8,
13561    };
13562    #[cfg(feature = "arbitrary")]
13563    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13564        use arbitrary::{Arbitrary, Unstructured};
13565        let mut buf = [0u8; 1024];
13566        rng.fill_bytes(&mut buf);
13567        let mut unstructured = Unstructured::new(&buf);
13568        Self::arbitrary(&mut unstructured).unwrap_or_default()
13569    }
13570}
13571impl Default for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13572    fn default() -> Self {
13573        Self::DEFAULT.clone()
13574    }
13575}
13576impl MessageData for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13577    type Message = MavMessage;
13578    const ID: u32 = 288u32;
13579    const NAME: &'static str = "GIMBAL_MANAGER_SET_MANUAL_CONTROL";
13580    const EXTRA_CRC: u8 = 20u8;
13581    const ENCODED_LEN: usize = 23usize;
13582    fn deser(
13583        _version: MavlinkVersion,
13584        __input: &[u8],
13585    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13586        let avail_len = __input.len();
13587        let mut payload_buf = [0; Self::ENCODED_LEN];
13588        let mut buf = if avail_len < Self::ENCODED_LEN {
13589            payload_buf[0..avail_len].copy_from_slice(__input);
13590            Bytes::new(&payload_buf)
13591        } else {
13592            Bytes::new(__input)
13593        };
13594        let mut __struct = Self::default();
13595        let tmp = buf.get_u32_le()?;
13596        __struct.flags = GimbalManagerFlags::from_bits(tmp as <GimbalManagerFlags as Flags>::Bits)
13597            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13598                flag_type: "GimbalManagerFlags",
13599                value: tmp as u64,
13600            })?;
13601        __struct.pitch = buf.get_f32_le()?;
13602        __struct.yaw = buf.get_f32_le()?;
13603        __struct.pitch_rate = buf.get_f32_le()?;
13604        __struct.yaw_rate = buf.get_f32_le()?;
13605        __struct.target_system = buf.get_u8()?;
13606        __struct.target_component = buf.get_u8()?;
13607        __struct.gimbal_device_id = buf.get_u8()?;
13608        Ok(__struct)
13609    }
13610    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13611        let mut __tmp = BytesMut::new(bytes);
13612        #[allow(clippy::absurd_extreme_comparisons)]
13613        #[allow(unused_comparisons)]
13614        if __tmp.remaining() < Self::ENCODED_LEN {
13615            panic!(
13616                "buffer is too small (need {} bytes, but got {})",
13617                Self::ENCODED_LEN,
13618                __tmp.remaining(),
13619            )
13620        }
13621        __tmp.put_u32_le(self.flags.bits() as u32);
13622        __tmp.put_f32_le(self.pitch);
13623        __tmp.put_f32_le(self.yaw);
13624        __tmp.put_f32_le(self.pitch_rate);
13625        __tmp.put_f32_le(self.yaw_rate);
13626        __tmp.put_u8(self.target_system);
13627        __tmp.put_u8(self.target_component);
13628        __tmp.put_u8(self.gimbal_device_id);
13629        if matches!(version, MavlinkVersion::V2) {
13630            let len = __tmp.len();
13631            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13632        } else {
13633            __tmp.len()
13634        }
13635    }
13636}
13637#[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
13638#[doc = ""]
13639#[doc = "ID: 287"]
13640#[derive(Debug, Clone, PartialEq)]
13641#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13642#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13643#[cfg_attr(feature = "ts", derive(TS))]
13644#[cfg_attr(feature = "ts", ts(export))]
13645pub struct GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13646    #[doc = "High level gimbal manager flags to use."]
13647    pub flags: GimbalManagerFlags,
13648    #[doc = "Pitch angle (positive: up, negative: down, NaN to be ignored)."]
13649    pub pitch: f32,
13650    #[doc = "Yaw angle (positive: to the right, negative: to the left, NaN to be ignored)."]
13651    pub yaw: f32,
13652    #[doc = "Pitch angular rate (positive: up, negative: down, NaN to be ignored)."]
13653    pub pitch_rate: f32,
13654    #[doc = "Yaw angular rate (positive: to the right, negative: to the left, NaN to be ignored)."]
13655    pub yaw_rate: f32,
13656    #[doc = "System ID"]
13657    pub target_system: u8,
13658    #[doc = "Component ID"]
13659    pub target_component: u8,
13660    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
13661    pub gimbal_device_id: u8,
13662}
13663impl GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13664    pub const ENCODED_LEN: usize = 23usize;
13665    pub const DEFAULT: Self = Self {
13666        flags: GimbalManagerFlags::DEFAULT,
13667        pitch: 0.0_f32,
13668        yaw: 0.0_f32,
13669        pitch_rate: 0.0_f32,
13670        yaw_rate: 0.0_f32,
13671        target_system: 0_u8,
13672        target_component: 0_u8,
13673        gimbal_device_id: 0_u8,
13674    };
13675    #[cfg(feature = "arbitrary")]
13676    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13677        use arbitrary::{Arbitrary, Unstructured};
13678        let mut buf = [0u8; 1024];
13679        rng.fill_bytes(&mut buf);
13680        let mut unstructured = Unstructured::new(&buf);
13681        Self::arbitrary(&mut unstructured).unwrap_or_default()
13682    }
13683}
13684impl Default for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13685    fn default() -> Self {
13686        Self::DEFAULT.clone()
13687    }
13688}
13689impl MessageData for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13690    type Message = MavMessage;
13691    const ID: u32 = 287u32;
13692    const NAME: &'static str = "GIMBAL_MANAGER_SET_PITCHYAW";
13693    const EXTRA_CRC: u8 = 1u8;
13694    const ENCODED_LEN: usize = 23usize;
13695    fn deser(
13696        _version: MavlinkVersion,
13697        __input: &[u8],
13698    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13699        let avail_len = __input.len();
13700        let mut payload_buf = [0; Self::ENCODED_LEN];
13701        let mut buf = if avail_len < Self::ENCODED_LEN {
13702            payload_buf[0..avail_len].copy_from_slice(__input);
13703            Bytes::new(&payload_buf)
13704        } else {
13705            Bytes::new(__input)
13706        };
13707        let mut __struct = Self::default();
13708        let tmp = buf.get_u32_le()?;
13709        __struct.flags = GimbalManagerFlags::from_bits(tmp as <GimbalManagerFlags as Flags>::Bits)
13710            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13711                flag_type: "GimbalManagerFlags",
13712                value: tmp as u64,
13713            })?;
13714        __struct.pitch = buf.get_f32_le()?;
13715        __struct.yaw = buf.get_f32_le()?;
13716        __struct.pitch_rate = buf.get_f32_le()?;
13717        __struct.yaw_rate = buf.get_f32_le()?;
13718        __struct.target_system = buf.get_u8()?;
13719        __struct.target_component = buf.get_u8()?;
13720        __struct.gimbal_device_id = buf.get_u8()?;
13721        Ok(__struct)
13722    }
13723    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13724        let mut __tmp = BytesMut::new(bytes);
13725        #[allow(clippy::absurd_extreme_comparisons)]
13726        #[allow(unused_comparisons)]
13727        if __tmp.remaining() < Self::ENCODED_LEN {
13728            panic!(
13729                "buffer is too small (need {} bytes, but got {})",
13730                Self::ENCODED_LEN,
13731                __tmp.remaining(),
13732            )
13733        }
13734        __tmp.put_u32_le(self.flags.bits() as u32);
13735        __tmp.put_f32_le(self.pitch);
13736        __tmp.put_f32_le(self.yaw);
13737        __tmp.put_f32_le(self.pitch_rate);
13738        __tmp.put_f32_le(self.yaw_rate);
13739        __tmp.put_u8(self.target_system);
13740        __tmp.put_u8(self.target_component);
13741        __tmp.put_u8(self.gimbal_device_id);
13742        if matches!(version, MavlinkVersion::V2) {
13743            let len = __tmp.len();
13744            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13745        } else {
13746            __tmp.len()
13747        }
13748    }
13749}
13750#[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
13751#[doc = ""]
13752#[doc = "ID: 281"]
13753#[derive(Debug, Clone, PartialEq)]
13754#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13755#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13756#[cfg_attr(feature = "ts", derive(TS))]
13757#[cfg_attr(feature = "ts", ts(export))]
13758pub struct GIMBAL_MANAGER_STATUS_DATA {
13759    #[doc = "Timestamp (time since system boot)."]
13760    pub time_boot_ms: u32,
13761    #[doc = "High level gimbal manager flags currently applied."]
13762    pub flags: GimbalManagerFlags,
13763    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
13764    pub gimbal_device_id: u8,
13765    #[doc = "System ID of MAVLink component with primary control, 0 for none."]
13766    pub primary_control_sysid: u8,
13767    #[doc = "Component ID of MAVLink component with primary control, 0 for none."]
13768    pub primary_control_compid: u8,
13769    #[doc = "System ID of MAVLink component with secondary control, 0 for none."]
13770    pub secondary_control_sysid: u8,
13771    #[doc = "Component ID of MAVLink component with secondary control, 0 for none."]
13772    pub secondary_control_compid: u8,
13773}
13774impl GIMBAL_MANAGER_STATUS_DATA {
13775    pub const ENCODED_LEN: usize = 13usize;
13776    pub const DEFAULT: Self = Self {
13777        time_boot_ms: 0_u32,
13778        flags: GimbalManagerFlags::DEFAULT,
13779        gimbal_device_id: 0_u8,
13780        primary_control_sysid: 0_u8,
13781        primary_control_compid: 0_u8,
13782        secondary_control_sysid: 0_u8,
13783        secondary_control_compid: 0_u8,
13784    };
13785    #[cfg(feature = "arbitrary")]
13786    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13787        use arbitrary::{Arbitrary, Unstructured};
13788        let mut buf = [0u8; 1024];
13789        rng.fill_bytes(&mut buf);
13790        let mut unstructured = Unstructured::new(&buf);
13791        Self::arbitrary(&mut unstructured).unwrap_or_default()
13792    }
13793}
13794impl Default for GIMBAL_MANAGER_STATUS_DATA {
13795    fn default() -> Self {
13796        Self::DEFAULT.clone()
13797    }
13798}
13799impl MessageData for GIMBAL_MANAGER_STATUS_DATA {
13800    type Message = MavMessage;
13801    const ID: u32 = 281u32;
13802    const NAME: &'static str = "GIMBAL_MANAGER_STATUS";
13803    const EXTRA_CRC: u8 = 48u8;
13804    const ENCODED_LEN: usize = 13usize;
13805    fn deser(
13806        _version: MavlinkVersion,
13807        __input: &[u8],
13808    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13809        let avail_len = __input.len();
13810        let mut payload_buf = [0; Self::ENCODED_LEN];
13811        let mut buf = if avail_len < Self::ENCODED_LEN {
13812            payload_buf[0..avail_len].copy_from_slice(__input);
13813            Bytes::new(&payload_buf)
13814        } else {
13815            Bytes::new(__input)
13816        };
13817        let mut __struct = Self::default();
13818        __struct.time_boot_ms = buf.get_u32_le()?;
13819        let tmp = buf.get_u32_le()?;
13820        __struct.flags = GimbalManagerFlags::from_bits(tmp as <GimbalManagerFlags as Flags>::Bits)
13821            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13822                flag_type: "GimbalManagerFlags",
13823                value: tmp as u64,
13824            })?;
13825        __struct.gimbal_device_id = buf.get_u8()?;
13826        __struct.primary_control_sysid = buf.get_u8()?;
13827        __struct.primary_control_compid = buf.get_u8()?;
13828        __struct.secondary_control_sysid = buf.get_u8()?;
13829        __struct.secondary_control_compid = buf.get_u8()?;
13830        Ok(__struct)
13831    }
13832    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13833        let mut __tmp = BytesMut::new(bytes);
13834        #[allow(clippy::absurd_extreme_comparisons)]
13835        #[allow(unused_comparisons)]
13836        if __tmp.remaining() < Self::ENCODED_LEN {
13837            panic!(
13838                "buffer is too small (need {} bytes, but got {})",
13839                Self::ENCODED_LEN,
13840                __tmp.remaining(),
13841            )
13842        }
13843        __tmp.put_u32_le(self.time_boot_ms);
13844        __tmp.put_u32_le(self.flags.bits() as u32);
13845        __tmp.put_u8(self.gimbal_device_id);
13846        __tmp.put_u8(self.primary_control_sysid);
13847        __tmp.put_u8(self.primary_control_compid);
13848        __tmp.put_u8(self.secondary_control_sysid);
13849        __tmp.put_u8(self.secondary_control_compid);
13850        if matches!(version, MavlinkVersion::V2) {
13851            let len = __tmp.len();
13852            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13853        } else {
13854            __tmp.len()
13855        }
13856    }
13857}
13858#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
13859#[doc = ""]
13860#[doc = "ID: 33"]
13861#[derive(Debug, Clone, PartialEq)]
13862#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13863#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13864#[cfg_attr(feature = "ts", derive(TS))]
13865#[cfg_attr(feature = "ts", ts(export))]
13866pub struct GLOBAL_POSITION_INT_DATA {
13867    #[doc = "Timestamp (time since system boot)."]
13868    pub time_boot_ms: u32,
13869    #[doc = "Latitude, expressed"]
13870    pub lat: i32,
13871    #[doc = "Longitude, expressed"]
13872    pub lon: i32,
13873    #[doc = "Altitude (MSL). Note that virtually all GPS modules provide both WGS84 and MSL."]
13874    pub alt: i32,
13875    #[doc = "Altitude above home"]
13876    pub relative_alt: i32,
13877    #[doc = "Ground X Speed (Latitude, positive north)"]
13878    pub vx: i16,
13879    #[doc = "Ground Y Speed (Longitude, positive east)"]
13880    pub vy: i16,
13881    #[doc = "Ground Z Speed (Altitude, positive down)"]
13882    pub vz: i16,
13883    #[doc = "Vehicle heading (yaw angle), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
13884    pub hdg: u16,
13885}
13886impl GLOBAL_POSITION_INT_DATA {
13887    pub const ENCODED_LEN: usize = 28usize;
13888    pub const DEFAULT: Self = Self {
13889        time_boot_ms: 0_u32,
13890        lat: 0_i32,
13891        lon: 0_i32,
13892        alt: 0_i32,
13893        relative_alt: 0_i32,
13894        vx: 0_i16,
13895        vy: 0_i16,
13896        vz: 0_i16,
13897        hdg: 0_u16,
13898    };
13899    #[cfg(feature = "arbitrary")]
13900    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13901        use arbitrary::{Arbitrary, Unstructured};
13902        let mut buf = [0u8; 1024];
13903        rng.fill_bytes(&mut buf);
13904        let mut unstructured = Unstructured::new(&buf);
13905        Self::arbitrary(&mut unstructured).unwrap_or_default()
13906    }
13907}
13908impl Default for GLOBAL_POSITION_INT_DATA {
13909    fn default() -> Self {
13910        Self::DEFAULT.clone()
13911    }
13912}
13913impl MessageData for GLOBAL_POSITION_INT_DATA {
13914    type Message = MavMessage;
13915    const ID: u32 = 33u32;
13916    const NAME: &'static str = "GLOBAL_POSITION_INT";
13917    const EXTRA_CRC: u8 = 104u8;
13918    const ENCODED_LEN: usize = 28usize;
13919    fn deser(
13920        _version: MavlinkVersion,
13921        __input: &[u8],
13922    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13923        let avail_len = __input.len();
13924        let mut payload_buf = [0; Self::ENCODED_LEN];
13925        let mut buf = if avail_len < Self::ENCODED_LEN {
13926            payload_buf[0..avail_len].copy_from_slice(__input);
13927            Bytes::new(&payload_buf)
13928        } else {
13929            Bytes::new(__input)
13930        };
13931        let mut __struct = Self::default();
13932        __struct.time_boot_ms = buf.get_u32_le()?;
13933        __struct.lat = buf.get_i32_le()?;
13934        __struct.lon = buf.get_i32_le()?;
13935        __struct.alt = buf.get_i32_le()?;
13936        __struct.relative_alt = buf.get_i32_le()?;
13937        __struct.vx = buf.get_i16_le()?;
13938        __struct.vy = buf.get_i16_le()?;
13939        __struct.vz = buf.get_i16_le()?;
13940        __struct.hdg = buf.get_u16_le()?;
13941        Ok(__struct)
13942    }
13943    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13944        let mut __tmp = BytesMut::new(bytes);
13945        #[allow(clippy::absurd_extreme_comparisons)]
13946        #[allow(unused_comparisons)]
13947        if __tmp.remaining() < Self::ENCODED_LEN {
13948            panic!(
13949                "buffer is too small (need {} bytes, but got {})",
13950                Self::ENCODED_LEN,
13951                __tmp.remaining(),
13952            )
13953        }
13954        __tmp.put_u32_le(self.time_boot_ms);
13955        __tmp.put_i32_le(self.lat);
13956        __tmp.put_i32_le(self.lon);
13957        __tmp.put_i32_le(self.alt);
13958        __tmp.put_i32_le(self.relative_alt);
13959        __tmp.put_i16_le(self.vx);
13960        __tmp.put_i16_le(self.vy);
13961        __tmp.put_i16_le(self.vz);
13962        __tmp.put_u16_le(self.hdg);
13963        if matches!(version, MavlinkVersion::V2) {
13964            let len = __tmp.len();
13965            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13966        } else {
13967            __tmp.len()
13968        }
13969    }
13970}
13971#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
13972#[doc = ""]
13973#[doc = "ID: 63"]
13974#[derive(Debug, Clone, PartialEq)]
13975#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13976#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13977#[cfg_attr(feature = "ts", derive(TS))]
13978#[cfg_attr(feature = "ts", ts(export))]
13979pub struct GLOBAL_POSITION_INT_COV_DATA {
13980    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13981    pub time_usec: u64,
13982    #[doc = "Latitude"]
13983    pub lat: i32,
13984    #[doc = "Longitude"]
13985    pub lon: i32,
13986    #[doc = "Altitude in meters above MSL"]
13987    pub alt: i32,
13988    #[doc = "Altitude above ground"]
13989    pub relative_alt: i32,
13990    #[doc = "Ground X Speed (Latitude)"]
13991    pub vx: f32,
13992    #[doc = "Ground Y Speed (Longitude)"]
13993    pub vy: f32,
13994    #[doc = "Ground Z Speed (Altitude)"]
13995    pub vz: f32,
13996    #[doc = "Row-major representation of a 6x6 position and velocity 6x6 cross-covariance matrix (states: lat, lon, alt, vx, vy, vz; first six entries are the first ROW, next six entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
13997    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13998    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
13999    pub covariance: [f32; 36],
14000    #[doc = "Class id of the estimator this estimate originated from."]
14001    pub estimator_type: MavEstimatorType,
14002}
14003impl GLOBAL_POSITION_INT_COV_DATA {
14004    pub const ENCODED_LEN: usize = 181usize;
14005    pub const DEFAULT: Self = Self {
14006        time_usec: 0_u64,
14007        lat: 0_i32,
14008        lon: 0_i32,
14009        alt: 0_i32,
14010        relative_alt: 0_i32,
14011        vx: 0.0_f32,
14012        vy: 0.0_f32,
14013        vz: 0.0_f32,
14014        covariance: [0.0_f32; 36usize],
14015        estimator_type: MavEstimatorType::DEFAULT,
14016    };
14017    #[cfg(feature = "arbitrary")]
14018    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14019        use arbitrary::{Arbitrary, Unstructured};
14020        let mut buf = [0u8; 1024];
14021        rng.fill_bytes(&mut buf);
14022        let mut unstructured = Unstructured::new(&buf);
14023        Self::arbitrary(&mut unstructured).unwrap_or_default()
14024    }
14025}
14026impl Default for GLOBAL_POSITION_INT_COV_DATA {
14027    fn default() -> Self {
14028        Self::DEFAULT.clone()
14029    }
14030}
14031impl MessageData for GLOBAL_POSITION_INT_COV_DATA {
14032    type Message = MavMessage;
14033    const ID: u32 = 63u32;
14034    const NAME: &'static str = "GLOBAL_POSITION_INT_COV";
14035    const EXTRA_CRC: u8 = 119u8;
14036    const ENCODED_LEN: usize = 181usize;
14037    fn deser(
14038        _version: MavlinkVersion,
14039        __input: &[u8],
14040    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14041        let avail_len = __input.len();
14042        let mut payload_buf = [0; Self::ENCODED_LEN];
14043        let mut buf = if avail_len < Self::ENCODED_LEN {
14044            payload_buf[0..avail_len].copy_from_slice(__input);
14045            Bytes::new(&payload_buf)
14046        } else {
14047            Bytes::new(__input)
14048        };
14049        let mut __struct = Self::default();
14050        __struct.time_usec = buf.get_u64_le()?;
14051        __struct.lat = buf.get_i32_le()?;
14052        __struct.lon = buf.get_i32_le()?;
14053        __struct.alt = buf.get_i32_le()?;
14054        __struct.relative_alt = buf.get_i32_le()?;
14055        __struct.vx = buf.get_f32_le()?;
14056        __struct.vy = buf.get_f32_le()?;
14057        __struct.vz = buf.get_f32_le()?;
14058        for v in &mut __struct.covariance {
14059            let val = buf.get_f32_le()?;
14060            *v = val;
14061        }
14062        let tmp = buf.get_u8()?;
14063        __struct.estimator_type =
14064            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14065                enum_type: "MavEstimatorType",
14066                value: tmp as u64,
14067            })?;
14068        Ok(__struct)
14069    }
14070    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14071        let mut __tmp = BytesMut::new(bytes);
14072        #[allow(clippy::absurd_extreme_comparisons)]
14073        #[allow(unused_comparisons)]
14074        if __tmp.remaining() < Self::ENCODED_LEN {
14075            panic!(
14076                "buffer is too small (need {} bytes, but got {})",
14077                Self::ENCODED_LEN,
14078                __tmp.remaining(),
14079            )
14080        }
14081        __tmp.put_u64_le(self.time_usec);
14082        __tmp.put_i32_le(self.lat);
14083        __tmp.put_i32_le(self.lon);
14084        __tmp.put_i32_le(self.alt);
14085        __tmp.put_i32_le(self.relative_alt);
14086        __tmp.put_f32_le(self.vx);
14087        __tmp.put_f32_le(self.vy);
14088        __tmp.put_f32_le(self.vz);
14089        for val in &self.covariance {
14090            __tmp.put_f32_le(*val);
14091        }
14092        __tmp.put_u8(self.estimator_type as u8);
14093        if matches!(version, MavlinkVersion::V2) {
14094            let len = __tmp.len();
14095            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14096        } else {
14097            __tmp.len()
14098        }
14099    }
14100}
14101#[doc = "Global position/attitude estimate from a vision source."]
14102#[doc = ""]
14103#[doc = "ID: 101"]
14104#[derive(Debug, Clone, PartialEq)]
14105#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14106#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14107#[cfg_attr(feature = "ts", derive(TS))]
14108#[cfg_attr(feature = "ts", ts(export))]
14109pub struct GLOBAL_VISION_POSITION_ESTIMATE_DATA {
14110    #[doc = "Timestamp (UNIX time or since system boot)"]
14111    pub usec: u64,
14112    #[doc = "Global X position"]
14113    pub x: f32,
14114    #[doc = "Global Y position"]
14115    pub y: f32,
14116    #[doc = "Global Z position"]
14117    pub z: f32,
14118    #[doc = "Roll angle"]
14119    pub roll: f32,
14120    #[doc = "Pitch angle"]
14121    pub pitch: f32,
14122    #[doc = "Yaw angle"]
14123    pub yaw: f32,
14124    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x_global, y_global, z_global, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
14125    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14126    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14127    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14128    pub covariance: [f32; 21],
14129    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
14130    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14131    pub reset_counter: u8,
14132}
14133impl GLOBAL_VISION_POSITION_ESTIMATE_DATA {
14134    pub const ENCODED_LEN: usize = 117usize;
14135    pub const DEFAULT: Self = Self {
14136        usec: 0_u64,
14137        x: 0.0_f32,
14138        y: 0.0_f32,
14139        z: 0.0_f32,
14140        roll: 0.0_f32,
14141        pitch: 0.0_f32,
14142        yaw: 0.0_f32,
14143        covariance: [0.0_f32; 21usize],
14144        reset_counter: 0_u8,
14145    };
14146    #[cfg(feature = "arbitrary")]
14147    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14148        use arbitrary::{Arbitrary, Unstructured};
14149        let mut buf = [0u8; 1024];
14150        rng.fill_bytes(&mut buf);
14151        let mut unstructured = Unstructured::new(&buf);
14152        Self::arbitrary(&mut unstructured).unwrap_or_default()
14153    }
14154}
14155impl Default for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
14156    fn default() -> Self {
14157        Self::DEFAULT.clone()
14158    }
14159}
14160impl MessageData for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
14161    type Message = MavMessage;
14162    const ID: u32 = 101u32;
14163    const NAME: &'static str = "GLOBAL_VISION_POSITION_ESTIMATE";
14164    const EXTRA_CRC: u8 = 102u8;
14165    const ENCODED_LEN: usize = 117usize;
14166    fn deser(
14167        _version: MavlinkVersion,
14168        __input: &[u8],
14169    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14170        let avail_len = __input.len();
14171        let mut payload_buf = [0; Self::ENCODED_LEN];
14172        let mut buf = if avail_len < Self::ENCODED_LEN {
14173            payload_buf[0..avail_len].copy_from_slice(__input);
14174            Bytes::new(&payload_buf)
14175        } else {
14176            Bytes::new(__input)
14177        };
14178        let mut __struct = Self::default();
14179        __struct.usec = buf.get_u64_le()?;
14180        __struct.x = buf.get_f32_le()?;
14181        __struct.y = buf.get_f32_le()?;
14182        __struct.z = buf.get_f32_le()?;
14183        __struct.roll = buf.get_f32_le()?;
14184        __struct.pitch = buf.get_f32_le()?;
14185        __struct.yaw = buf.get_f32_le()?;
14186        for v in &mut __struct.covariance {
14187            let val = buf.get_f32_le()?;
14188            *v = val;
14189        }
14190        __struct.reset_counter = buf.get_u8()?;
14191        Ok(__struct)
14192    }
14193    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14194        let mut __tmp = BytesMut::new(bytes);
14195        #[allow(clippy::absurd_extreme_comparisons)]
14196        #[allow(unused_comparisons)]
14197        if __tmp.remaining() < Self::ENCODED_LEN {
14198            panic!(
14199                "buffer is too small (need {} bytes, but got {})",
14200                Self::ENCODED_LEN,
14201                __tmp.remaining(),
14202            )
14203        }
14204        __tmp.put_u64_le(self.usec);
14205        __tmp.put_f32_le(self.x);
14206        __tmp.put_f32_le(self.y);
14207        __tmp.put_f32_le(self.z);
14208        __tmp.put_f32_le(self.roll);
14209        __tmp.put_f32_le(self.pitch);
14210        __tmp.put_f32_le(self.yaw);
14211        if matches!(version, MavlinkVersion::V2) {
14212            for val in &self.covariance {
14213                __tmp.put_f32_le(*val);
14214            }
14215            __tmp.put_u8(self.reset_counter);
14216            let len = __tmp.len();
14217            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14218        } else {
14219            __tmp.len()
14220        }
14221    }
14222}
14223#[doc = "Information about key components of GNSS receivers, like signal authentication, interference and system errors."]
14224#[doc = ""]
14225#[doc = "ID: 441"]
14226#[derive(Debug, Clone, PartialEq)]
14227#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14228#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14229#[cfg_attr(feature = "ts", derive(TS))]
14230#[cfg_attr(feature = "ts", ts(export))]
14231pub struct GNSS_INTEGRITY_DATA {
14232    #[doc = "Errors in the GPS system."]
14233    pub system_errors: GpsSystemErrorFlags,
14234    #[doc = "Horizontal expected accuracy using satellites successfully validated using RAIM."]
14235    pub raim_hfom: u16,
14236    #[doc = "Vertical expected accuracy using satellites successfully validated using RAIM."]
14237    pub raim_vfom: u16,
14238    #[doc = "GNSS receiver id. Must match instance ids of other messages from same receiver."]
14239    pub id: u8,
14240    #[doc = "Signal authentication state of the GPS system."]
14241    pub authentication_state: GpsAuthenticationState,
14242    #[doc = "Signal jamming state of the GPS system."]
14243    pub jamming_state: GpsJammingState,
14244    #[doc = "Signal spoofing state of the GPS system."]
14245    pub spoofing_state: GpsSpoofingState,
14246    #[doc = "The state of the RAIM processing."]
14247    pub raim_state: GpsRaimState,
14248    #[doc = "An abstract value representing the estimated quality of incoming corrections, or 255 if not available."]
14249    pub corrections_quality: u8,
14250    #[doc = "An abstract value representing the overall status of the receiver, or 255 if not available."]
14251    pub system_status_summary: u8,
14252    #[doc = "An abstract value representing the quality of incoming GNSS signals, or 255 if not available."]
14253    pub gnss_signal_quality: u8,
14254    #[doc = "An abstract value representing the estimated PPK quality, or 255 if not available."]
14255    pub post_processing_quality: u8,
14256}
14257impl GNSS_INTEGRITY_DATA {
14258    pub const ENCODED_LEN: usize = 17usize;
14259    pub const DEFAULT: Self = Self {
14260        system_errors: GpsSystemErrorFlags::DEFAULT,
14261        raim_hfom: 0_u16,
14262        raim_vfom: 0_u16,
14263        id: 0_u8,
14264        authentication_state: GpsAuthenticationState::DEFAULT,
14265        jamming_state: GpsJammingState::DEFAULT,
14266        spoofing_state: GpsSpoofingState::DEFAULT,
14267        raim_state: GpsRaimState::DEFAULT,
14268        corrections_quality: 0_u8,
14269        system_status_summary: 0_u8,
14270        gnss_signal_quality: 0_u8,
14271        post_processing_quality: 0_u8,
14272    };
14273    #[cfg(feature = "arbitrary")]
14274    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14275        use arbitrary::{Arbitrary, Unstructured};
14276        let mut buf = [0u8; 1024];
14277        rng.fill_bytes(&mut buf);
14278        let mut unstructured = Unstructured::new(&buf);
14279        Self::arbitrary(&mut unstructured).unwrap_or_default()
14280    }
14281}
14282impl Default for GNSS_INTEGRITY_DATA {
14283    fn default() -> Self {
14284        Self::DEFAULT.clone()
14285    }
14286}
14287impl MessageData for GNSS_INTEGRITY_DATA {
14288    type Message = MavMessage;
14289    const ID: u32 = 441u32;
14290    const NAME: &'static str = "GNSS_INTEGRITY";
14291    const EXTRA_CRC: u8 = 169u8;
14292    const ENCODED_LEN: usize = 17usize;
14293    fn deser(
14294        _version: MavlinkVersion,
14295        __input: &[u8],
14296    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14297        let avail_len = __input.len();
14298        let mut payload_buf = [0; Self::ENCODED_LEN];
14299        let mut buf = if avail_len < Self::ENCODED_LEN {
14300            payload_buf[0..avail_len].copy_from_slice(__input);
14301            Bytes::new(&payload_buf)
14302        } else {
14303            Bytes::new(__input)
14304        };
14305        let mut __struct = Self::default();
14306        let tmp = buf.get_u32_le()?;
14307        __struct.system_errors = GpsSystemErrorFlags::from_bits(
14308            tmp as <GpsSystemErrorFlags as Flags>::Bits,
14309        )
14310        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
14311            flag_type: "GpsSystemErrorFlags",
14312            value: tmp as u64,
14313        })?;
14314        __struct.raim_hfom = buf.get_u16_le()?;
14315        __struct.raim_vfom = buf.get_u16_le()?;
14316        __struct.id = buf.get_u8()?;
14317        let tmp = buf.get_u8()?;
14318        __struct.authentication_state =
14319            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14320                enum_type: "GpsAuthenticationState",
14321                value: tmp as u64,
14322            })?;
14323        let tmp = buf.get_u8()?;
14324        __struct.jamming_state =
14325            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14326                enum_type: "GpsJammingState",
14327                value: tmp as u64,
14328            })?;
14329        let tmp = buf.get_u8()?;
14330        __struct.spoofing_state =
14331            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14332                enum_type: "GpsSpoofingState",
14333                value: tmp as u64,
14334            })?;
14335        let tmp = buf.get_u8()?;
14336        __struct.raim_state =
14337            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14338                enum_type: "GpsRaimState",
14339                value: tmp as u64,
14340            })?;
14341        __struct.corrections_quality = buf.get_u8()?;
14342        __struct.system_status_summary = buf.get_u8()?;
14343        __struct.gnss_signal_quality = buf.get_u8()?;
14344        __struct.post_processing_quality = buf.get_u8()?;
14345        Ok(__struct)
14346    }
14347    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14348        let mut __tmp = BytesMut::new(bytes);
14349        #[allow(clippy::absurd_extreme_comparisons)]
14350        #[allow(unused_comparisons)]
14351        if __tmp.remaining() < Self::ENCODED_LEN {
14352            panic!(
14353                "buffer is too small (need {} bytes, but got {})",
14354                Self::ENCODED_LEN,
14355                __tmp.remaining(),
14356            )
14357        }
14358        __tmp.put_u32_le(self.system_errors.bits() as u32);
14359        __tmp.put_u16_le(self.raim_hfom);
14360        __tmp.put_u16_le(self.raim_vfom);
14361        __tmp.put_u8(self.id);
14362        __tmp.put_u8(self.authentication_state as u8);
14363        __tmp.put_u8(self.jamming_state as u8);
14364        __tmp.put_u8(self.spoofing_state as u8);
14365        __tmp.put_u8(self.raim_state as u8);
14366        __tmp.put_u8(self.corrections_quality);
14367        __tmp.put_u8(self.system_status_summary);
14368        __tmp.put_u8(self.gnss_signal_quality);
14369        __tmp.put_u8(self.post_processing_quality);
14370        if matches!(version, MavlinkVersion::V2) {
14371            let len = __tmp.len();
14372            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14373        } else {
14374            __tmp.len()
14375        }
14376    }
14377}
14378#[doc = "Second GPS data."]
14379#[doc = ""]
14380#[doc = "ID: 124"]
14381#[derive(Debug, Clone, PartialEq)]
14382#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14383#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14384#[cfg_attr(feature = "ts", derive(TS))]
14385#[cfg_attr(feature = "ts", ts(export))]
14386pub struct GPS2_RAW_DATA {
14387    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14388    pub time_usec: u64,
14389    #[doc = "Latitude (WGS84)"]
14390    pub lat: i32,
14391    #[doc = "Longitude (WGS84)"]
14392    pub lon: i32,
14393    #[doc = "Altitude (MSL). Positive for up."]
14394    pub alt: i32,
14395    #[doc = "Age of DGPS info"]
14396    pub dgps_age: u32,
14397    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14398    pub eph: u16,
14399    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14400    pub epv: u16,
14401    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
14402    pub vel: u16,
14403    #[doc = "Course over ground (NOT heading, but direction of movement): 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
14404    pub cog: u16,
14405    #[doc = "GPS fix type."]
14406    pub fix_type: GpsFixType,
14407    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
14408    pub satellites_visible: u8,
14409    #[doc = "Number of DGPS satellites"]
14410    pub dgps_numch: u8,
14411    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
14412    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14413    pub yaw: u16,
14414    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
14415    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14416    pub alt_ellipsoid: i32,
14417    #[doc = "Position uncertainty."]
14418    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14419    pub h_acc: u32,
14420    #[doc = "Altitude uncertainty."]
14421    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14422    pub v_acc: u32,
14423    #[doc = "Speed uncertainty."]
14424    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14425    pub vel_acc: u32,
14426    #[doc = "Heading / track uncertainty"]
14427    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14428    pub hdg_acc: u32,
14429}
14430impl GPS2_RAW_DATA {
14431    pub const ENCODED_LEN: usize = 57usize;
14432    pub const DEFAULT: Self = Self {
14433        time_usec: 0_u64,
14434        lat: 0_i32,
14435        lon: 0_i32,
14436        alt: 0_i32,
14437        dgps_age: 0_u32,
14438        eph: 0_u16,
14439        epv: 0_u16,
14440        vel: 0_u16,
14441        cog: 0_u16,
14442        fix_type: GpsFixType::DEFAULT,
14443        satellites_visible: 0_u8,
14444        dgps_numch: 0_u8,
14445        yaw: 0_u16,
14446        alt_ellipsoid: 0_i32,
14447        h_acc: 0_u32,
14448        v_acc: 0_u32,
14449        vel_acc: 0_u32,
14450        hdg_acc: 0_u32,
14451    };
14452    #[cfg(feature = "arbitrary")]
14453    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14454        use arbitrary::{Arbitrary, Unstructured};
14455        let mut buf = [0u8; 1024];
14456        rng.fill_bytes(&mut buf);
14457        let mut unstructured = Unstructured::new(&buf);
14458        Self::arbitrary(&mut unstructured).unwrap_or_default()
14459    }
14460}
14461impl Default for GPS2_RAW_DATA {
14462    fn default() -> Self {
14463        Self::DEFAULT.clone()
14464    }
14465}
14466impl MessageData for GPS2_RAW_DATA {
14467    type Message = MavMessage;
14468    const ID: u32 = 124u32;
14469    const NAME: &'static str = "GPS2_RAW";
14470    const EXTRA_CRC: u8 = 87u8;
14471    const ENCODED_LEN: usize = 57usize;
14472    fn deser(
14473        _version: MavlinkVersion,
14474        __input: &[u8],
14475    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14476        let avail_len = __input.len();
14477        let mut payload_buf = [0; Self::ENCODED_LEN];
14478        let mut buf = if avail_len < Self::ENCODED_LEN {
14479            payload_buf[0..avail_len].copy_from_slice(__input);
14480            Bytes::new(&payload_buf)
14481        } else {
14482            Bytes::new(__input)
14483        };
14484        let mut __struct = Self::default();
14485        __struct.time_usec = buf.get_u64_le()?;
14486        __struct.lat = buf.get_i32_le()?;
14487        __struct.lon = buf.get_i32_le()?;
14488        __struct.alt = buf.get_i32_le()?;
14489        __struct.dgps_age = buf.get_u32_le()?;
14490        __struct.eph = buf.get_u16_le()?;
14491        __struct.epv = buf.get_u16_le()?;
14492        __struct.vel = buf.get_u16_le()?;
14493        __struct.cog = buf.get_u16_le()?;
14494        let tmp = buf.get_u8()?;
14495        __struct.fix_type =
14496            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14497                enum_type: "GpsFixType",
14498                value: tmp as u64,
14499            })?;
14500        __struct.satellites_visible = buf.get_u8()?;
14501        __struct.dgps_numch = buf.get_u8()?;
14502        __struct.yaw = buf.get_u16_le()?;
14503        __struct.alt_ellipsoid = buf.get_i32_le()?;
14504        __struct.h_acc = buf.get_u32_le()?;
14505        __struct.v_acc = buf.get_u32_le()?;
14506        __struct.vel_acc = buf.get_u32_le()?;
14507        __struct.hdg_acc = buf.get_u32_le()?;
14508        Ok(__struct)
14509    }
14510    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14511        let mut __tmp = BytesMut::new(bytes);
14512        #[allow(clippy::absurd_extreme_comparisons)]
14513        #[allow(unused_comparisons)]
14514        if __tmp.remaining() < Self::ENCODED_LEN {
14515            panic!(
14516                "buffer is too small (need {} bytes, but got {})",
14517                Self::ENCODED_LEN,
14518                __tmp.remaining(),
14519            )
14520        }
14521        __tmp.put_u64_le(self.time_usec);
14522        __tmp.put_i32_le(self.lat);
14523        __tmp.put_i32_le(self.lon);
14524        __tmp.put_i32_le(self.alt);
14525        __tmp.put_u32_le(self.dgps_age);
14526        __tmp.put_u16_le(self.eph);
14527        __tmp.put_u16_le(self.epv);
14528        __tmp.put_u16_le(self.vel);
14529        __tmp.put_u16_le(self.cog);
14530        __tmp.put_u8(self.fix_type as u8);
14531        __tmp.put_u8(self.satellites_visible);
14532        __tmp.put_u8(self.dgps_numch);
14533        if matches!(version, MavlinkVersion::V2) {
14534            __tmp.put_u16_le(self.yaw);
14535            __tmp.put_i32_le(self.alt_ellipsoid);
14536            __tmp.put_u32_le(self.h_acc);
14537            __tmp.put_u32_le(self.v_acc);
14538            __tmp.put_u32_le(self.vel_acc);
14539            __tmp.put_u32_le(self.hdg_acc);
14540            let len = __tmp.len();
14541            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14542        } else {
14543            __tmp.len()
14544        }
14545    }
14546}
14547#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
14548#[doc = ""]
14549#[doc = "ID: 128"]
14550#[derive(Debug, Clone, PartialEq)]
14551#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14552#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14553#[cfg_attr(feature = "ts", derive(TS))]
14554#[cfg_attr(feature = "ts", ts(export))]
14555pub struct GPS2_RTK_DATA {
14556    #[doc = "Time since boot of last baseline message received."]
14557    pub time_last_baseline_ms: u32,
14558    #[doc = "GPS Time of Week of last baseline"]
14559    pub tow: u32,
14560    #[doc = "Current baseline in ECEF x or NED north component."]
14561    pub baseline_a_mm: i32,
14562    #[doc = "Current baseline in ECEF y or NED east component."]
14563    pub baseline_b_mm: i32,
14564    #[doc = "Current baseline in ECEF z or NED down component."]
14565    pub baseline_c_mm: i32,
14566    #[doc = "Current estimate of baseline accuracy."]
14567    pub accuracy: u32,
14568    #[doc = "Current number of integer ambiguity hypotheses."]
14569    pub iar_num_hypotheses: i32,
14570    #[doc = "GPS Week Number of last baseline"]
14571    pub wn: u16,
14572    #[doc = "Identification of connected RTK receiver."]
14573    pub rtk_receiver_id: u8,
14574    #[doc = "GPS-specific health report for RTK data."]
14575    pub rtk_health: u8,
14576    #[doc = "Rate of baseline messages being received by GPS"]
14577    pub rtk_rate: u8,
14578    #[doc = "Current number of sats used for RTK calculation."]
14579    pub nsats: u8,
14580    #[doc = "Coordinate system of baseline"]
14581    pub baseline_coords_type: RtkBaselineCoordinateSystem,
14582}
14583impl GPS2_RTK_DATA {
14584    pub const ENCODED_LEN: usize = 35usize;
14585    pub const DEFAULT: Self = Self {
14586        time_last_baseline_ms: 0_u32,
14587        tow: 0_u32,
14588        baseline_a_mm: 0_i32,
14589        baseline_b_mm: 0_i32,
14590        baseline_c_mm: 0_i32,
14591        accuracy: 0_u32,
14592        iar_num_hypotheses: 0_i32,
14593        wn: 0_u16,
14594        rtk_receiver_id: 0_u8,
14595        rtk_health: 0_u8,
14596        rtk_rate: 0_u8,
14597        nsats: 0_u8,
14598        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
14599    };
14600    #[cfg(feature = "arbitrary")]
14601    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14602        use arbitrary::{Arbitrary, Unstructured};
14603        let mut buf = [0u8; 1024];
14604        rng.fill_bytes(&mut buf);
14605        let mut unstructured = Unstructured::new(&buf);
14606        Self::arbitrary(&mut unstructured).unwrap_or_default()
14607    }
14608}
14609impl Default for GPS2_RTK_DATA {
14610    fn default() -> Self {
14611        Self::DEFAULT.clone()
14612    }
14613}
14614impl MessageData for GPS2_RTK_DATA {
14615    type Message = MavMessage;
14616    const ID: u32 = 128u32;
14617    const NAME: &'static str = "GPS2_RTK";
14618    const EXTRA_CRC: u8 = 226u8;
14619    const ENCODED_LEN: usize = 35usize;
14620    fn deser(
14621        _version: MavlinkVersion,
14622        __input: &[u8],
14623    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14624        let avail_len = __input.len();
14625        let mut payload_buf = [0; Self::ENCODED_LEN];
14626        let mut buf = if avail_len < Self::ENCODED_LEN {
14627            payload_buf[0..avail_len].copy_from_slice(__input);
14628            Bytes::new(&payload_buf)
14629        } else {
14630            Bytes::new(__input)
14631        };
14632        let mut __struct = Self::default();
14633        __struct.time_last_baseline_ms = buf.get_u32_le()?;
14634        __struct.tow = buf.get_u32_le()?;
14635        __struct.baseline_a_mm = buf.get_i32_le()?;
14636        __struct.baseline_b_mm = buf.get_i32_le()?;
14637        __struct.baseline_c_mm = buf.get_i32_le()?;
14638        __struct.accuracy = buf.get_u32_le()?;
14639        __struct.iar_num_hypotheses = buf.get_i32_le()?;
14640        __struct.wn = buf.get_u16_le()?;
14641        __struct.rtk_receiver_id = buf.get_u8()?;
14642        __struct.rtk_health = buf.get_u8()?;
14643        __struct.rtk_rate = buf.get_u8()?;
14644        __struct.nsats = buf.get_u8()?;
14645        let tmp = buf.get_u8()?;
14646        __struct.baseline_coords_type =
14647            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14648                enum_type: "RtkBaselineCoordinateSystem",
14649                value: tmp as u64,
14650            })?;
14651        Ok(__struct)
14652    }
14653    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14654        let mut __tmp = BytesMut::new(bytes);
14655        #[allow(clippy::absurd_extreme_comparisons)]
14656        #[allow(unused_comparisons)]
14657        if __tmp.remaining() < Self::ENCODED_LEN {
14658            panic!(
14659                "buffer is too small (need {} bytes, but got {})",
14660                Self::ENCODED_LEN,
14661                __tmp.remaining(),
14662            )
14663        }
14664        __tmp.put_u32_le(self.time_last_baseline_ms);
14665        __tmp.put_u32_le(self.tow);
14666        __tmp.put_i32_le(self.baseline_a_mm);
14667        __tmp.put_i32_le(self.baseline_b_mm);
14668        __tmp.put_i32_le(self.baseline_c_mm);
14669        __tmp.put_u32_le(self.accuracy);
14670        __tmp.put_i32_le(self.iar_num_hypotheses);
14671        __tmp.put_u16_le(self.wn);
14672        __tmp.put_u8(self.rtk_receiver_id);
14673        __tmp.put_u8(self.rtk_health);
14674        __tmp.put_u8(self.rtk_rate);
14675        __tmp.put_u8(self.nsats);
14676        __tmp.put_u8(self.baseline_coords_type as u8);
14677        if matches!(version, MavlinkVersion::V2) {
14678            let len = __tmp.len();
14679            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14680        } else {
14681            __tmp.len()
14682        }
14683    }
14684}
14685#[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
14686#[doc = ""]
14687#[doc = "ID: 49"]
14688#[derive(Debug, Clone, PartialEq)]
14689#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14690#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14691#[cfg_attr(feature = "ts", derive(TS))]
14692#[cfg_attr(feature = "ts", ts(export))]
14693pub struct GPS_GLOBAL_ORIGIN_DATA {
14694    #[doc = "Latitude (WGS84)"]
14695    pub latitude: i32,
14696    #[doc = "Longitude (WGS84)"]
14697    pub longitude: i32,
14698    #[doc = "Altitude (MSL). Positive for up."]
14699    pub altitude: i32,
14700    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14701    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14702    pub time_usec: u64,
14703}
14704impl GPS_GLOBAL_ORIGIN_DATA {
14705    pub const ENCODED_LEN: usize = 20usize;
14706    pub const DEFAULT: Self = Self {
14707        latitude: 0_i32,
14708        longitude: 0_i32,
14709        altitude: 0_i32,
14710        time_usec: 0_u64,
14711    };
14712    #[cfg(feature = "arbitrary")]
14713    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14714        use arbitrary::{Arbitrary, Unstructured};
14715        let mut buf = [0u8; 1024];
14716        rng.fill_bytes(&mut buf);
14717        let mut unstructured = Unstructured::new(&buf);
14718        Self::arbitrary(&mut unstructured).unwrap_or_default()
14719    }
14720}
14721impl Default for GPS_GLOBAL_ORIGIN_DATA {
14722    fn default() -> Self {
14723        Self::DEFAULT.clone()
14724    }
14725}
14726impl MessageData for GPS_GLOBAL_ORIGIN_DATA {
14727    type Message = MavMessage;
14728    const ID: u32 = 49u32;
14729    const NAME: &'static str = "GPS_GLOBAL_ORIGIN";
14730    const EXTRA_CRC: u8 = 39u8;
14731    const ENCODED_LEN: usize = 20usize;
14732    fn deser(
14733        _version: MavlinkVersion,
14734        __input: &[u8],
14735    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14736        let avail_len = __input.len();
14737        let mut payload_buf = [0; Self::ENCODED_LEN];
14738        let mut buf = if avail_len < Self::ENCODED_LEN {
14739            payload_buf[0..avail_len].copy_from_slice(__input);
14740            Bytes::new(&payload_buf)
14741        } else {
14742            Bytes::new(__input)
14743        };
14744        let mut __struct = Self::default();
14745        __struct.latitude = buf.get_i32_le()?;
14746        __struct.longitude = buf.get_i32_le()?;
14747        __struct.altitude = buf.get_i32_le()?;
14748        __struct.time_usec = buf.get_u64_le()?;
14749        Ok(__struct)
14750    }
14751    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14752        let mut __tmp = BytesMut::new(bytes);
14753        #[allow(clippy::absurd_extreme_comparisons)]
14754        #[allow(unused_comparisons)]
14755        if __tmp.remaining() < Self::ENCODED_LEN {
14756            panic!(
14757                "buffer is too small (need {} bytes, but got {})",
14758                Self::ENCODED_LEN,
14759                __tmp.remaining(),
14760            )
14761        }
14762        __tmp.put_i32_le(self.latitude);
14763        __tmp.put_i32_le(self.longitude);
14764        __tmp.put_i32_le(self.altitude);
14765        if matches!(version, MavlinkVersion::V2) {
14766            __tmp.put_u64_le(self.time_usec);
14767            let len = __tmp.len();
14768            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14769        } else {
14770            __tmp.len()
14771        }
14772    }
14773}
14774#[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
14775#[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
14776#[doc = ""]
14777#[doc = "ID: 123"]
14778#[derive(Debug, Clone, PartialEq)]
14779#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14780#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14781#[cfg_attr(feature = "ts", derive(TS))]
14782#[cfg_attr(feature = "ts", ts(export))]
14783pub struct GPS_INJECT_DATA_DATA {
14784    #[doc = "System ID"]
14785    pub target_system: u8,
14786    #[doc = "Component ID"]
14787    pub target_component: u8,
14788    #[doc = "Data length"]
14789    pub len: u8,
14790    #[doc = "Raw data (110 is enough for 12 satellites of RTCMv2)"]
14791    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14792    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
14793    pub data: [u8; 110],
14794}
14795impl GPS_INJECT_DATA_DATA {
14796    pub const ENCODED_LEN: usize = 113usize;
14797    pub const DEFAULT: Self = Self {
14798        target_system: 0_u8,
14799        target_component: 0_u8,
14800        len: 0_u8,
14801        data: [0_u8; 110usize],
14802    };
14803    #[cfg(feature = "arbitrary")]
14804    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14805        use arbitrary::{Arbitrary, Unstructured};
14806        let mut buf = [0u8; 1024];
14807        rng.fill_bytes(&mut buf);
14808        let mut unstructured = Unstructured::new(&buf);
14809        Self::arbitrary(&mut unstructured).unwrap_or_default()
14810    }
14811}
14812impl Default for GPS_INJECT_DATA_DATA {
14813    fn default() -> Self {
14814        Self::DEFAULT.clone()
14815    }
14816}
14817impl MessageData for GPS_INJECT_DATA_DATA {
14818    type Message = MavMessage;
14819    const ID: u32 = 123u32;
14820    const NAME: &'static str = "GPS_INJECT_DATA";
14821    const EXTRA_CRC: u8 = 250u8;
14822    const ENCODED_LEN: usize = 113usize;
14823    fn deser(
14824        _version: MavlinkVersion,
14825        __input: &[u8],
14826    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14827        let avail_len = __input.len();
14828        let mut payload_buf = [0; Self::ENCODED_LEN];
14829        let mut buf = if avail_len < Self::ENCODED_LEN {
14830            payload_buf[0..avail_len].copy_from_slice(__input);
14831            Bytes::new(&payload_buf)
14832        } else {
14833            Bytes::new(__input)
14834        };
14835        let mut __struct = Self::default();
14836        __struct.target_system = buf.get_u8()?;
14837        __struct.target_component = buf.get_u8()?;
14838        __struct.len = buf.get_u8()?;
14839        for v in &mut __struct.data {
14840            let val = buf.get_u8()?;
14841            *v = val;
14842        }
14843        Ok(__struct)
14844    }
14845    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14846        let mut __tmp = BytesMut::new(bytes);
14847        #[allow(clippy::absurd_extreme_comparisons)]
14848        #[allow(unused_comparisons)]
14849        if __tmp.remaining() < Self::ENCODED_LEN {
14850            panic!(
14851                "buffer is too small (need {} bytes, but got {})",
14852                Self::ENCODED_LEN,
14853                __tmp.remaining(),
14854            )
14855        }
14856        __tmp.put_u8(self.target_system);
14857        __tmp.put_u8(self.target_component);
14858        __tmp.put_u8(self.len);
14859        for val in &self.data {
14860            __tmp.put_u8(*val);
14861        }
14862        if matches!(version, MavlinkVersion::V2) {
14863            let len = __tmp.len();
14864            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14865        } else {
14866            __tmp.len()
14867        }
14868    }
14869}
14870#[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
14871#[doc = ""]
14872#[doc = "ID: 232"]
14873#[derive(Debug, Clone, PartialEq)]
14874#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14875#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14876#[cfg_attr(feature = "ts", derive(TS))]
14877#[cfg_attr(feature = "ts", ts(export))]
14878pub struct GPS_INPUT_DATA {
14879    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14880    pub time_usec: u64,
14881    #[doc = "GPS time (from start of GPS week)"]
14882    pub time_week_ms: u32,
14883    #[doc = "Latitude (WGS84)"]
14884    pub lat: i32,
14885    #[doc = "Longitude (WGS84)"]
14886    pub lon: i32,
14887    #[doc = "Altitude (MSL). Positive for up."]
14888    pub alt: f32,
14889    #[doc = "GPS HDOP horizontal dilution of position (unitless). If unknown, set to: UINT16_MAX"]
14890    pub hdop: f32,
14891    #[doc = "GPS VDOP vertical dilution of position (unitless). If unknown, set to: UINT16_MAX"]
14892    pub vdop: f32,
14893    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
14894    pub vn: f32,
14895    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
14896    pub ve: f32,
14897    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
14898    pub vd: f32,
14899    #[doc = "GPS speed accuracy"]
14900    pub speed_accuracy: f32,
14901    #[doc = "GPS horizontal accuracy"]
14902    pub horiz_accuracy: f32,
14903    #[doc = "GPS vertical accuracy"]
14904    pub vert_accuracy: f32,
14905    #[doc = "Bitmap indicating which GPS input flags fields to ignore.  All other fields must be provided."]
14906    pub ignore_flags: GpsInputIgnoreFlags,
14907    #[doc = "GPS week number"]
14908    pub time_week: u16,
14909    #[doc = "ID of the GPS for multiple GPS inputs"]
14910    pub gps_id: u8,
14911    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. 4: 3D with DGPS. 5: 3D with RTK"]
14912    pub fix_type: u8,
14913    #[doc = "Number of satellites visible."]
14914    pub satellites_visible: u8,
14915    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
14916    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14917    pub yaw: u16,
14918}
14919impl GPS_INPUT_DATA {
14920    pub const ENCODED_LEN: usize = 65usize;
14921    pub const DEFAULT: Self = Self {
14922        time_usec: 0_u64,
14923        time_week_ms: 0_u32,
14924        lat: 0_i32,
14925        lon: 0_i32,
14926        alt: 0.0_f32,
14927        hdop: 0.0_f32,
14928        vdop: 0.0_f32,
14929        vn: 0.0_f32,
14930        ve: 0.0_f32,
14931        vd: 0.0_f32,
14932        speed_accuracy: 0.0_f32,
14933        horiz_accuracy: 0.0_f32,
14934        vert_accuracy: 0.0_f32,
14935        ignore_flags: GpsInputIgnoreFlags::DEFAULT,
14936        time_week: 0_u16,
14937        gps_id: 0_u8,
14938        fix_type: 0_u8,
14939        satellites_visible: 0_u8,
14940        yaw: 0_u16,
14941    };
14942    #[cfg(feature = "arbitrary")]
14943    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14944        use arbitrary::{Arbitrary, Unstructured};
14945        let mut buf = [0u8; 1024];
14946        rng.fill_bytes(&mut buf);
14947        let mut unstructured = Unstructured::new(&buf);
14948        Self::arbitrary(&mut unstructured).unwrap_or_default()
14949    }
14950}
14951impl Default for GPS_INPUT_DATA {
14952    fn default() -> Self {
14953        Self::DEFAULT.clone()
14954    }
14955}
14956impl MessageData for GPS_INPUT_DATA {
14957    type Message = MavMessage;
14958    const ID: u32 = 232u32;
14959    const NAME: &'static str = "GPS_INPUT";
14960    const EXTRA_CRC: u8 = 151u8;
14961    const ENCODED_LEN: usize = 65usize;
14962    fn deser(
14963        _version: MavlinkVersion,
14964        __input: &[u8],
14965    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14966        let avail_len = __input.len();
14967        let mut payload_buf = [0; Self::ENCODED_LEN];
14968        let mut buf = if avail_len < Self::ENCODED_LEN {
14969            payload_buf[0..avail_len].copy_from_slice(__input);
14970            Bytes::new(&payload_buf)
14971        } else {
14972            Bytes::new(__input)
14973        };
14974        let mut __struct = Self::default();
14975        __struct.time_usec = buf.get_u64_le()?;
14976        __struct.time_week_ms = buf.get_u32_le()?;
14977        __struct.lat = buf.get_i32_le()?;
14978        __struct.lon = buf.get_i32_le()?;
14979        __struct.alt = buf.get_f32_le()?;
14980        __struct.hdop = buf.get_f32_le()?;
14981        __struct.vdop = buf.get_f32_le()?;
14982        __struct.vn = buf.get_f32_le()?;
14983        __struct.ve = buf.get_f32_le()?;
14984        __struct.vd = buf.get_f32_le()?;
14985        __struct.speed_accuracy = buf.get_f32_le()?;
14986        __struct.horiz_accuracy = buf.get_f32_le()?;
14987        __struct.vert_accuracy = buf.get_f32_le()?;
14988        let tmp = buf.get_u16_le()?;
14989        __struct.ignore_flags = GpsInputIgnoreFlags::from_bits(
14990            tmp as <GpsInputIgnoreFlags as Flags>::Bits,
14991        )
14992        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
14993            flag_type: "GpsInputIgnoreFlags",
14994            value: tmp as u64,
14995        })?;
14996        __struct.time_week = buf.get_u16_le()?;
14997        __struct.gps_id = buf.get_u8()?;
14998        __struct.fix_type = buf.get_u8()?;
14999        __struct.satellites_visible = buf.get_u8()?;
15000        __struct.yaw = buf.get_u16_le()?;
15001        Ok(__struct)
15002    }
15003    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15004        let mut __tmp = BytesMut::new(bytes);
15005        #[allow(clippy::absurd_extreme_comparisons)]
15006        #[allow(unused_comparisons)]
15007        if __tmp.remaining() < Self::ENCODED_LEN {
15008            panic!(
15009                "buffer is too small (need {} bytes, but got {})",
15010                Self::ENCODED_LEN,
15011                __tmp.remaining(),
15012            )
15013        }
15014        __tmp.put_u64_le(self.time_usec);
15015        __tmp.put_u32_le(self.time_week_ms);
15016        __tmp.put_i32_le(self.lat);
15017        __tmp.put_i32_le(self.lon);
15018        __tmp.put_f32_le(self.alt);
15019        __tmp.put_f32_le(self.hdop);
15020        __tmp.put_f32_le(self.vdop);
15021        __tmp.put_f32_le(self.vn);
15022        __tmp.put_f32_le(self.ve);
15023        __tmp.put_f32_le(self.vd);
15024        __tmp.put_f32_le(self.speed_accuracy);
15025        __tmp.put_f32_le(self.horiz_accuracy);
15026        __tmp.put_f32_le(self.vert_accuracy);
15027        __tmp.put_u16_le(self.ignore_flags.bits() as u16);
15028        __tmp.put_u16_le(self.time_week);
15029        __tmp.put_u8(self.gps_id);
15030        __tmp.put_u8(self.fix_type);
15031        __tmp.put_u8(self.satellites_visible);
15032        if matches!(version, MavlinkVersion::V2) {
15033            __tmp.put_u16_le(self.yaw);
15034            let len = __tmp.len();
15035            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15036        } else {
15037            __tmp.len()
15038        }
15039    }
15040}
15041#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
15042#[doc = ""]
15043#[doc = "ID: 24"]
15044#[derive(Debug, Clone, PartialEq)]
15045#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15046#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15047#[cfg_attr(feature = "ts", derive(TS))]
15048#[cfg_attr(feature = "ts", ts(export))]
15049pub struct GPS_RAW_INT_DATA {
15050    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15051    pub time_usec: u64,
15052    #[doc = "Latitude (WGS84, EGM96 ellipsoid)"]
15053    pub lat: i32,
15054    #[doc = "Longitude (WGS84, EGM96 ellipsoid)"]
15055    pub lon: i32,
15056    #[doc = "Altitude (MSL). Positive for up. Note that virtually all GPS modules provide the MSL altitude in addition to the WGS84 altitude."]
15057    pub alt: i32,
15058    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
15059    pub eph: u16,
15060    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
15061    pub epv: u16,
15062    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
15063    pub vel: u16,
15064    #[doc = "Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
15065    pub cog: u16,
15066    #[doc = "GPS fix type."]
15067    pub fix_type: GpsFixType,
15068    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
15069    pub satellites_visible: u8,
15070    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
15071    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15072    pub alt_ellipsoid: i32,
15073    #[doc = "Position uncertainty."]
15074    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15075    pub h_acc: u32,
15076    #[doc = "Altitude uncertainty."]
15077    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15078    pub v_acc: u32,
15079    #[doc = "Speed uncertainty."]
15080    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15081    pub vel_acc: u32,
15082    #[doc = "Heading / track uncertainty"]
15083    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15084    pub hdg_acc: u32,
15085    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
15086    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15087    pub yaw: u16,
15088}
15089impl GPS_RAW_INT_DATA {
15090    pub const ENCODED_LEN: usize = 52usize;
15091    pub const DEFAULT: Self = Self {
15092        time_usec: 0_u64,
15093        lat: 0_i32,
15094        lon: 0_i32,
15095        alt: 0_i32,
15096        eph: 0_u16,
15097        epv: 0_u16,
15098        vel: 0_u16,
15099        cog: 0_u16,
15100        fix_type: GpsFixType::DEFAULT,
15101        satellites_visible: 0_u8,
15102        alt_ellipsoid: 0_i32,
15103        h_acc: 0_u32,
15104        v_acc: 0_u32,
15105        vel_acc: 0_u32,
15106        hdg_acc: 0_u32,
15107        yaw: 0_u16,
15108    };
15109    #[cfg(feature = "arbitrary")]
15110    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15111        use arbitrary::{Arbitrary, Unstructured};
15112        let mut buf = [0u8; 1024];
15113        rng.fill_bytes(&mut buf);
15114        let mut unstructured = Unstructured::new(&buf);
15115        Self::arbitrary(&mut unstructured).unwrap_or_default()
15116    }
15117}
15118impl Default for GPS_RAW_INT_DATA {
15119    fn default() -> Self {
15120        Self::DEFAULT.clone()
15121    }
15122}
15123impl MessageData for GPS_RAW_INT_DATA {
15124    type Message = MavMessage;
15125    const ID: u32 = 24u32;
15126    const NAME: &'static str = "GPS_RAW_INT";
15127    const EXTRA_CRC: u8 = 24u8;
15128    const ENCODED_LEN: usize = 52usize;
15129    fn deser(
15130        _version: MavlinkVersion,
15131        __input: &[u8],
15132    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15133        let avail_len = __input.len();
15134        let mut payload_buf = [0; Self::ENCODED_LEN];
15135        let mut buf = if avail_len < Self::ENCODED_LEN {
15136            payload_buf[0..avail_len].copy_from_slice(__input);
15137            Bytes::new(&payload_buf)
15138        } else {
15139            Bytes::new(__input)
15140        };
15141        let mut __struct = Self::default();
15142        __struct.time_usec = buf.get_u64_le()?;
15143        __struct.lat = buf.get_i32_le()?;
15144        __struct.lon = buf.get_i32_le()?;
15145        __struct.alt = buf.get_i32_le()?;
15146        __struct.eph = buf.get_u16_le()?;
15147        __struct.epv = buf.get_u16_le()?;
15148        __struct.vel = buf.get_u16_le()?;
15149        __struct.cog = buf.get_u16_le()?;
15150        let tmp = buf.get_u8()?;
15151        __struct.fix_type =
15152            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15153                enum_type: "GpsFixType",
15154                value: tmp as u64,
15155            })?;
15156        __struct.satellites_visible = buf.get_u8()?;
15157        __struct.alt_ellipsoid = buf.get_i32_le()?;
15158        __struct.h_acc = buf.get_u32_le()?;
15159        __struct.v_acc = buf.get_u32_le()?;
15160        __struct.vel_acc = buf.get_u32_le()?;
15161        __struct.hdg_acc = buf.get_u32_le()?;
15162        __struct.yaw = buf.get_u16_le()?;
15163        Ok(__struct)
15164    }
15165    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15166        let mut __tmp = BytesMut::new(bytes);
15167        #[allow(clippy::absurd_extreme_comparisons)]
15168        #[allow(unused_comparisons)]
15169        if __tmp.remaining() < Self::ENCODED_LEN {
15170            panic!(
15171                "buffer is too small (need {} bytes, but got {})",
15172                Self::ENCODED_LEN,
15173                __tmp.remaining(),
15174            )
15175        }
15176        __tmp.put_u64_le(self.time_usec);
15177        __tmp.put_i32_le(self.lat);
15178        __tmp.put_i32_le(self.lon);
15179        __tmp.put_i32_le(self.alt);
15180        __tmp.put_u16_le(self.eph);
15181        __tmp.put_u16_le(self.epv);
15182        __tmp.put_u16_le(self.vel);
15183        __tmp.put_u16_le(self.cog);
15184        __tmp.put_u8(self.fix_type as u8);
15185        __tmp.put_u8(self.satellites_visible);
15186        if matches!(version, MavlinkVersion::V2) {
15187            __tmp.put_i32_le(self.alt_ellipsoid);
15188            __tmp.put_u32_le(self.h_acc);
15189            __tmp.put_u32_le(self.v_acc);
15190            __tmp.put_u32_le(self.vel_acc);
15191            __tmp.put_u32_le(self.hdg_acc);
15192            __tmp.put_u16_le(self.yaw);
15193            let len = __tmp.len();
15194            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15195        } else {
15196            __tmp.len()
15197        }
15198    }
15199}
15200#[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
15201#[doc = ""]
15202#[doc = "ID: 233"]
15203#[derive(Debug, Clone, PartialEq)]
15204#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15205#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15206#[cfg_attr(feature = "ts", derive(TS))]
15207#[cfg_attr(feature = "ts", ts(export))]
15208pub struct GPS_RTCM_DATA_DATA {
15209    #[doc = "LSB: 1 means message is fragmented, next 2 bits are the fragment ID, the remaining 5 bits are used for the sequence ID. Messages are only to be flushed to the GPS when the entire message has been reconstructed on the autopilot. The fragment ID specifies which order the fragments should be assembled into a buffer, while the sequence ID is used to detect a mismatch between different buffers. The buffer is considered fully reconstructed when either all 4 fragments are present, or all the fragments before the first fragment with a non full payload is received. This management is used to ensure that normal GPS operation doesn't corrupt RTCM data, and to recover from a unreliable transport delivery order."]
15210    pub flags: u8,
15211    #[doc = "data length"]
15212    pub len: u8,
15213    #[doc = "RTCM message (may be fragmented)"]
15214    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15215    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15216    pub data: [u8; 180],
15217}
15218impl GPS_RTCM_DATA_DATA {
15219    pub const ENCODED_LEN: usize = 182usize;
15220    pub const DEFAULT: Self = Self {
15221        flags: 0_u8,
15222        len: 0_u8,
15223        data: [0_u8; 180usize],
15224    };
15225    #[cfg(feature = "arbitrary")]
15226    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15227        use arbitrary::{Arbitrary, Unstructured};
15228        let mut buf = [0u8; 1024];
15229        rng.fill_bytes(&mut buf);
15230        let mut unstructured = Unstructured::new(&buf);
15231        Self::arbitrary(&mut unstructured).unwrap_or_default()
15232    }
15233}
15234impl Default for GPS_RTCM_DATA_DATA {
15235    fn default() -> Self {
15236        Self::DEFAULT.clone()
15237    }
15238}
15239impl MessageData for GPS_RTCM_DATA_DATA {
15240    type Message = MavMessage;
15241    const ID: u32 = 233u32;
15242    const NAME: &'static str = "GPS_RTCM_DATA";
15243    const EXTRA_CRC: u8 = 35u8;
15244    const ENCODED_LEN: usize = 182usize;
15245    fn deser(
15246        _version: MavlinkVersion,
15247        __input: &[u8],
15248    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15249        let avail_len = __input.len();
15250        let mut payload_buf = [0; Self::ENCODED_LEN];
15251        let mut buf = if avail_len < Self::ENCODED_LEN {
15252            payload_buf[0..avail_len].copy_from_slice(__input);
15253            Bytes::new(&payload_buf)
15254        } else {
15255            Bytes::new(__input)
15256        };
15257        let mut __struct = Self::default();
15258        __struct.flags = buf.get_u8()?;
15259        __struct.len = buf.get_u8()?;
15260        for v in &mut __struct.data {
15261            let val = buf.get_u8()?;
15262            *v = val;
15263        }
15264        Ok(__struct)
15265    }
15266    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15267        let mut __tmp = BytesMut::new(bytes);
15268        #[allow(clippy::absurd_extreme_comparisons)]
15269        #[allow(unused_comparisons)]
15270        if __tmp.remaining() < Self::ENCODED_LEN {
15271            panic!(
15272                "buffer is too small (need {} bytes, but got {})",
15273                Self::ENCODED_LEN,
15274                __tmp.remaining(),
15275            )
15276        }
15277        __tmp.put_u8(self.flags);
15278        __tmp.put_u8(self.len);
15279        for val in &self.data {
15280            __tmp.put_u8(*val);
15281        }
15282        if matches!(version, MavlinkVersion::V2) {
15283            let len = __tmp.len();
15284            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15285        } else {
15286            __tmp.len()
15287        }
15288    }
15289}
15290#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
15291#[doc = ""]
15292#[doc = "ID: 127"]
15293#[derive(Debug, Clone, PartialEq)]
15294#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15295#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15296#[cfg_attr(feature = "ts", derive(TS))]
15297#[cfg_attr(feature = "ts", ts(export))]
15298pub struct GPS_RTK_DATA {
15299    #[doc = "Time since boot of last baseline message received."]
15300    pub time_last_baseline_ms: u32,
15301    #[doc = "GPS Time of Week of last baseline"]
15302    pub tow: u32,
15303    #[doc = "Current baseline in ECEF x or NED north component."]
15304    pub baseline_a_mm: i32,
15305    #[doc = "Current baseline in ECEF y or NED east component."]
15306    pub baseline_b_mm: i32,
15307    #[doc = "Current baseline in ECEF z or NED down component."]
15308    pub baseline_c_mm: i32,
15309    #[doc = "Current estimate of baseline accuracy."]
15310    pub accuracy: u32,
15311    #[doc = "Current number of integer ambiguity hypotheses."]
15312    pub iar_num_hypotheses: i32,
15313    #[doc = "GPS Week Number of last baseline"]
15314    pub wn: u16,
15315    #[doc = "Identification of connected RTK receiver."]
15316    pub rtk_receiver_id: u8,
15317    #[doc = "GPS-specific health report for RTK data."]
15318    pub rtk_health: u8,
15319    #[doc = "Rate of baseline messages being received by GPS"]
15320    pub rtk_rate: u8,
15321    #[doc = "Current number of sats used for RTK calculation."]
15322    pub nsats: u8,
15323    #[doc = "Coordinate system of baseline"]
15324    pub baseline_coords_type: RtkBaselineCoordinateSystem,
15325}
15326impl GPS_RTK_DATA {
15327    pub const ENCODED_LEN: usize = 35usize;
15328    pub const DEFAULT: Self = Self {
15329        time_last_baseline_ms: 0_u32,
15330        tow: 0_u32,
15331        baseline_a_mm: 0_i32,
15332        baseline_b_mm: 0_i32,
15333        baseline_c_mm: 0_i32,
15334        accuracy: 0_u32,
15335        iar_num_hypotheses: 0_i32,
15336        wn: 0_u16,
15337        rtk_receiver_id: 0_u8,
15338        rtk_health: 0_u8,
15339        rtk_rate: 0_u8,
15340        nsats: 0_u8,
15341        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
15342    };
15343    #[cfg(feature = "arbitrary")]
15344    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15345        use arbitrary::{Arbitrary, Unstructured};
15346        let mut buf = [0u8; 1024];
15347        rng.fill_bytes(&mut buf);
15348        let mut unstructured = Unstructured::new(&buf);
15349        Self::arbitrary(&mut unstructured).unwrap_or_default()
15350    }
15351}
15352impl Default for GPS_RTK_DATA {
15353    fn default() -> Self {
15354        Self::DEFAULT.clone()
15355    }
15356}
15357impl MessageData for GPS_RTK_DATA {
15358    type Message = MavMessage;
15359    const ID: u32 = 127u32;
15360    const NAME: &'static str = "GPS_RTK";
15361    const EXTRA_CRC: u8 = 25u8;
15362    const ENCODED_LEN: usize = 35usize;
15363    fn deser(
15364        _version: MavlinkVersion,
15365        __input: &[u8],
15366    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15367        let avail_len = __input.len();
15368        let mut payload_buf = [0; Self::ENCODED_LEN];
15369        let mut buf = if avail_len < Self::ENCODED_LEN {
15370            payload_buf[0..avail_len].copy_from_slice(__input);
15371            Bytes::new(&payload_buf)
15372        } else {
15373            Bytes::new(__input)
15374        };
15375        let mut __struct = Self::default();
15376        __struct.time_last_baseline_ms = buf.get_u32_le()?;
15377        __struct.tow = buf.get_u32_le()?;
15378        __struct.baseline_a_mm = buf.get_i32_le()?;
15379        __struct.baseline_b_mm = buf.get_i32_le()?;
15380        __struct.baseline_c_mm = buf.get_i32_le()?;
15381        __struct.accuracy = buf.get_u32_le()?;
15382        __struct.iar_num_hypotheses = buf.get_i32_le()?;
15383        __struct.wn = buf.get_u16_le()?;
15384        __struct.rtk_receiver_id = buf.get_u8()?;
15385        __struct.rtk_health = buf.get_u8()?;
15386        __struct.rtk_rate = buf.get_u8()?;
15387        __struct.nsats = buf.get_u8()?;
15388        let tmp = buf.get_u8()?;
15389        __struct.baseline_coords_type =
15390            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15391                enum_type: "RtkBaselineCoordinateSystem",
15392                value: tmp as u64,
15393            })?;
15394        Ok(__struct)
15395    }
15396    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15397        let mut __tmp = BytesMut::new(bytes);
15398        #[allow(clippy::absurd_extreme_comparisons)]
15399        #[allow(unused_comparisons)]
15400        if __tmp.remaining() < Self::ENCODED_LEN {
15401            panic!(
15402                "buffer is too small (need {} bytes, but got {})",
15403                Self::ENCODED_LEN,
15404                __tmp.remaining(),
15405            )
15406        }
15407        __tmp.put_u32_le(self.time_last_baseline_ms);
15408        __tmp.put_u32_le(self.tow);
15409        __tmp.put_i32_le(self.baseline_a_mm);
15410        __tmp.put_i32_le(self.baseline_b_mm);
15411        __tmp.put_i32_le(self.baseline_c_mm);
15412        __tmp.put_u32_le(self.accuracy);
15413        __tmp.put_i32_le(self.iar_num_hypotheses);
15414        __tmp.put_u16_le(self.wn);
15415        __tmp.put_u8(self.rtk_receiver_id);
15416        __tmp.put_u8(self.rtk_health);
15417        __tmp.put_u8(self.rtk_rate);
15418        __tmp.put_u8(self.nsats);
15419        __tmp.put_u8(self.baseline_coords_type as u8);
15420        if matches!(version, MavlinkVersion::V2) {
15421            let len = __tmp.len();
15422            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15423        } else {
15424            __tmp.len()
15425        }
15426    }
15427}
15428#[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
15429#[doc = ""]
15430#[doc = "ID: 25"]
15431#[derive(Debug, Clone, PartialEq)]
15432#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15433#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15434#[cfg_attr(feature = "ts", derive(TS))]
15435#[cfg_attr(feature = "ts", ts(export))]
15436pub struct GPS_STATUS_DATA {
15437    #[doc = "Number of satellites visible"]
15438    pub satellites_visible: u8,
15439    #[doc = "Global satellite ID"]
15440    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15441    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15442    pub satellite_prn: [u8; 20],
15443    #[doc = "0: Satellite not used, 1: used for localization"]
15444    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15445    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15446    pub satellite_used: [u8; 20],
15447    #[doc = "Elevation (0: right on top of receiver, 90: on the horizon) of satellite"]
15448    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15449    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15450    pub satellite_elevation: [u8; 20],
15451    #[doc = "Direction of satellite, 0: 0 deg, 255: 360 deg."]
15452    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15453    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15454    pub satellite_azimuth: [u8; 20],
15455    #[doc = "Signal to noise ratio of satellite"]
15456    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15457    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
15458    pub satellite_snr: [u8; 20],
15459}
15460impl GPS_STATUS_DATA {
15461    pub const ENCODED_LEN: usize = 101usize;
15462    pub const DEFAULT: Self = Self {
15463        satellites_visible: 0_u8,
15464        satellite_prn: [0_u8; 20usize],
15465        satellite_used: [0_u8; 20usize],
15466        satellite_elevation: [0_u8; 20usize],
15467        satellite_azimuth: [0_u8; 20usize],
15468        satellite_snr: [0_u8; 20usize],
15469    };
15470    #[cfg(feature = "arbitrary")]
15471    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15472        use arbitrary::{Arbitrary, Unstructured};
15473        let mut buf = [0u8; 1024];
15474        rng.fill_bytes(&mut buf);
15475        let mut unstructured = Unstructured::new(&buf);
15476        Self::arbitrary(&mut unstructured).unwrap_or_default()
15477    }
15478}
15479impl Default for GPS_STATUS_DATA {
15480    fn default() -> Self {
15481        Self::DEFAULT.clone()
15482    }
15483}
15484impl MessageData for GPS_STATUS_DATA {
15485    type Message = MavMessage;
15486    const ID: u32 = 25u32;
15487    const NAME: &'static str = "GPS_STATUS";
15488    const EXTRA_CRC: u8 = 23u8;
15489    const ENCODED_LEN: usize = 101usize;
15490    fn deser(
15491        _version: MavlinkVersion,
15492        __input: &[u8],
15493    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15494        let avail_len = __input.len();
15495        let mut payload_buf = [0; Self::ENCODED_LEN];
15496        let mut buf = if avail_len < Self::ENCODED_LEN {
15497            payload_buf[0..avail_len].copy_from_slice(__input);
15498            Bytes::new(&payload_buf)
15499        } else {
15500            Bytes::new(__input)
15501        };
15502        let mut __struct = Self::default();
15503        __struct.satellites_visible = buf.get_u8()?;
15504        for v in &mut __struct.satellite_prn {
15505            let val = buf.get_u8()?;
15506            *v = val;
15507        }
15508        for v in &mut __struct.satellite_used {
15509            let val = buf.get_u8()?;
15510            *v = val;
15511        }
15512        for v in &mut __struct.satellite_elevation {
15513            let val = buf.get_u8()?;
15514            *v = val;
15515        }
15516        for v in &mut __struct.satellite_azimuth {
15517            let val = buf.get_u8()?;
15518            *v = val;
15519        }
15520        for v in &mut __struct.satellite_snr {
15521            let val = buf.get_u8()?;
15522            *v = val;
15523        }
15524        Ok(__struct)
15525    }
15526    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15527        let mut __tmp = BytesMut::new(bytes);
15528        #[allow(clippy::absurd_extreme_comparisons)]
15529        #[allow(unused_comparisons)]
15530        if __tmp.remaining() < Self::ENCODED_LEN {
15531            panic!(
15532                "buffer is too small (need {} bytes, but got {})",
15533                Self::ENCODED_LEN,
15534                __tmp.remaining(),
15535            )
15536        }
15537        __tmp.put_u8(self.satellites_visible);
15538        for val in &self.satellite_prn {
15539            __tmp.put_u8(*val);
15540        }
15541        for val in &self.satellite_used {
15542            __tmp.put_u8(*val);
15543        }
15544        for val in &self.satellite_elevation {
15545            __tmp.put_u8(*val);
15546        }
15547        for val in &self.satellite_azimuth {
15548            __tmp.put_u8(*val);
15549        }
15550        for val in &self.satellite_snr {
15551            __tmp.put_u8(*val);
15552        }
15553        if matches!(version, MavlinkVersion::V2) {
15554            let len = __tmp.len();
15555            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15556        } else {
15557            __tmp.len()
15558        }
15559    }
15560}
15561#[doc = "Emitted during mission execution when control reaches MAV_CMD_GROUP_END."]
15562#[doc = ""]
15563#[doc = "ID: 415"]
15564#[derive(Debug, Clone, PartialEq)]
15565#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15566#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15567#[cfg_attr(feature = "ts", derive(TS))]
15568#[cfg_attr(feature = "ts", ts(export))]
15569pub struct GROUP_END_DATA {
15570    #[doc = "Timestamp (UNIX Epoch time or time since system boot).         The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15571    pub time_usec: u64,
15572    #[doc = "Mission-unique group id (from MAV_CMD_GROUP_END)."]
15573    pub group_id: u32,
15574    #[doc = "CRC32 checksum of current plan for MAV_MISSION_TYPE_ALL. As defined in MISSION_CHECKSUM message."]
15575    pub mission_checksum: u32,
15576}
15577impl GROUP_END_DATA {
15578    pub const ENCODED_LEN: usize = 16usize;
15579    pub const DEFAULT: Self = Self {
15580        time_usec: 0_u64,
15581        group_id: 0_u32,
15582        mission_checksum: 0_u32,
15583    };
15584    #[cfg(feature = "arbitrary")]
15585    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15586        use arbitrary::{Arbitrary, Unstructured};
15587        let mut buf = [0u8; 1024];
15588        rng.fill_bytes(&mut buf);
15589        let mut unstructured = Unstructured::new(&buf);
15590        Self::arbitrary(&mut unstructured).unwrap_or_default()
15591    }
15592}
15593impl Default for GROUP_END_DATA {
15594    fn default() -> Self {
15595        Self::DEFAULT.clone()
15596    }
15597}
15598impl MessageData for GROUP_END_DATA {
15599    type Message = MavMessage;
15600    const ID: u32 = 415u32;
15601    const NAME: &'static str = "GROUP_END";
15602    const EXTRA_CRC: u8 = 161u8;
15603    const ENCODED_LEN: usize = 16usize;
15604    fn deser(
15605        _version: MavlinkVersion,
15606        __input: &[u8],
15607    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15608        let avail_len = __input.len();
15609        let mut payload_buf = [0; Self::ENCODED_LEN];
15610        let mut buf = if avail_len < Self::ENCODED_LEN {
15611            payload_buf[0..avail_len].copy_from_slice(__input);
15612            Bytes::new(&payload_buf)
15613        } else {
15614            Bytes::new(__input)
15615        };
15616        let mut __struct = Self::default();
15617        __struct.time_usec = buf.get_u64_le()?;
15618        __struct.group_id = buf.get_u32_le()?;
15619        __struct.mission_checksum = buf.get_u32_le()?;
15620        Ok(__struct)
15621    }
15622    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15623        let mut __tmp = BytesMut::new(bytes);
15624        #[allow(clippy::absurd_extreme_comparisons)]
15625        #[allow(unused_comparisons)]
15626        if __tmp.remaining() < Self::ENCODED_LEN {
15627            panic!(
15628                "buffer is too small (need {} bytes, but got {})",
15629                Self::ENCODED_LEN,
15630                __tmp.remaining(),
15631            )
15632        }
15633        __tmp.put_u64_le(self.time_usec);
15634        __tmp.put_u32_le(self.group_id);
15635        __tmp.put_u32_le(self.mission_checksum);
15636        if matches!(version, MavlinkVersion::V2) {
15637            let len = __tmp.len();
15638            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15639        } else {
15640            __tmp.len()
15641        }
15642    }
15643}
15644#[doc = "Emitted during mission execution when control reaches MAV_CMD_GROUP_START."]
15645#[doc = ""]
15646#[doc = "ID: 414"]
15647#[derive(Debug, Clone, PartialEq)]
15648#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15649#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15650#[cfg_attr(feature = "ts", derive(TS))]
15651#[cfg_attr(feature = "ts", ts(export))]
15652pub struct GROUP_START_DATA {
15653    #[doc = "Timestamp (UNIX Epoch time or time since system boot).         The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15654    pub time_usec: u64,
15655    #[doc = "Mission-unique group id (from MAV_CMD_GROUP_START)."]
15656    pub group_id: u32,
15657    #[doc = "CRC32 checksum of current plan for MAV_MISSION_TYPE_ALL. As defined in MISSION_CHECKSUM message."]
15658    pub mission_checksum: u32,
15659}
15660impl GROUP_START_DATA {
15661    pub const ENCODED_LEN: usize = 16usize;
15662    pub const DEFAULT: Self = Self {
15663        time_usec: 0_u64,
15664        group_id: 0_u32,
15665        mission_checksum: 0_u32,
15666    };
15667    #[cfg(feature = "arbitrary")]
15668    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15669        use arbitrary::{Arbitrary, Unstructured};
15670        let mut buf = [0u8; 1024];
15671        rng.fill_bytes(&mut buf);
15672        let mut unstructured = Unstructured::new(&buf);
15673        Self::arbitrary(&mut unstructured).unwrap_or_default()
15674    }
15675}
15676impl Default for GROUP_START_DATA {
15677    fn default() -> Self {
15678        Self::DEFAULT.clone()
15679    }
15680}
15681impl MessageData for GROUP_START_DATA {
15682    type Message = MavMessage;
15683    const ID: u32 = 414u32;
15684    const NAME: &'static str = "GROUP_START";
15685    const EXTRA_CRC: u8 = 109u8;
15686    const ENCODED_LEN: usize = 16usize;
15687    fn deser(
15688        _version: MavlinkVersion,
15689        __input: &[u8],
15690    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15691        let avail_len = __input.len();
15692        let mut payload_buf = [0; Self::ENCODED_LEN];
15693        let mut buf = if avail_len < Self::ENCODED_LEN {
15694            payload_buf[0..avail_len].copy_from_slice(__input);
15695            Bytes::new(&payload_buf)
15696        } else {
15697            Bytes::new(__input)
15698        };
15699        let mut __struct = Self::default();
15700        __struct.time_usec = buf.get_u64_le()?;
15701        __struct.group_id = buf.get_u32_le()?;
15702        __struct.mission_checksum = buf.get_u32_le()?;
15703        Ok(__struct)
15704    }
15705    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15706        let mut __tmp = BytesMut::new(bytes);
15707        #[allow(clippy::absurd_extreme_comparisons)]
15708        #[allow(unused_comparisons)]
15709        if __tmp.remaining() < Self::ENCODED_LEN {
15710            panic!(
15711                "buffer is too small (need {} bytes, but got {})",
15712                Self::ENCODED_LEN,
15713                __tmp.remaining(),
15714            )
15715        }
15716        __tmp.put_u64_le(self.time_usec);
15717        __tmp.put_u32_le(self.group_id);
15718        __tmp.put_u32_le(self.mission_checksum);
15719        if matches!(version, MavlinkVersion::V2) {
15720            let len = __tmp.len();
15721            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15722        } else {
15723            __tmp.len()
15724        }
15725    }
15726}
15727#[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
15728#[doc = ""]
15729#[doc = "ID: 0"]
15730#[derive(Debug, Clone, PartialEq)]
15731#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15732#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15733#[cfg_attr(feature = "ts", derive(TS))]
15734#[cfg_attr(feature = "ts", ts(export))]
15735pub struct HEARTBEAT_DATA {
15736    #[doc = "A bitfield for use for autopilot-specific flags"]
15737    pub custom_mode: u32,
15738    #[doc = "Vehicle or component type. For a flight controller component the vehicle type (quadrotor, helicopter, etc.). For other components the component type (e.g. camera, gimbal, etc.). This should be used in preference to component id for identifying the component type."]
15739    pub mavtype: MavType,
15740    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
15741    pub autopilot: MavAutopilot,
15742    #[doc = "System mode bitmap."]
15743    pub base_mode: MavModeFlag,
15744    #[doc = "System status flag."]
15745    pub system_status: MavState,
15746    #[doc = "MAVLink version, not writable by user, gets added by protocol because of magic data type: uint8_t_mavlink_version"]
15747    pub mavlink_version: u8,
15748}
15749impl HEARTBEAT_DATA {
15750    pub const ENCODED_LEN: usize = 9usize;
15751    pub const DEFAULT: Self = Self {
15752        custom_mode: 0_u32,
15753        mavtype: MavType::DEFAULT,
15754        autopilot: MavAutopilot::DEFAULT,
15755        base_mode: MavModeFlag::DEFAULT,
15756        system_status: MavState::DEFAULT,
15757        mavlink_version: MINOR_MAVLINK_VERSION,
15758    };
15759    #[cfg(feature = "arbitrary")]
15760    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15761        use arbitrary::{Arbitrary, Unstructured};
15762        let mut buf = [0u8; 1024];
15763        rng.fill_bytes(&mut buf);
15764        let mut unstructured = Unstructured::new(&buf);
15765        Self::arbitrary(&mut unstructured).unwrap_or_default()
15766    }
15767}
15768impl Default for HEARTBEAT_DATA {
15769    fn default() -> Self {
15770        Self::DEFAULT.clone()
15771    }
15772}
15773impl MessageData for HEARTBEAT_DATA {
15774    type Message = MavMessage;
15775    const ID: u32 = 0u32;
15776    const NAME: &'static str = "HEARTBEAT";
15777    const EXTRA_CRC: u8 = 50u8;
15778    const ENCODED_LEN: usize = 9usize;
15779    fn deser(
15780        _version: MavlinkVersion,
15781        __input: &[u8],
15782    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15783        let avail_len = __input.len();
15784        let mut payload_buf = [0; Self::ENCODED_LEN];
15785        let mut buf = if avail_len < Self::ENCODED_LEN {
15786            payload_buf[0..avail_len].copy_from_slice(__input);
15787            Bytes::new(&payload_buf)
15788        } else {
15789            Bytes::new(__input)
15790        };
15791        let mut __struct = Self::default();
15792        __struct.custom_mode = buf.get_u32_le()?;
15793        let tmp = buf.get_u8()?;
15794        __struct.mavtype =
15795            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15796                enum_type: "MavType",
15797                value: tmp as u64,
15798            })?;
15799        let tmp = buf.get_u8()?;
15800        __struct.autopilot =
15801            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15802                enum_type: "MavAutopilot",
15803                value: tmp as u64,
15804            })?;
15805        let tmp = buf.get_u8()?;
15806        __struct.base_mode = MavModeFlag::from_bits(tmp as <MavModeFlag as Flags>::Bits).ok_or(
15807            ::mavlink_core::error::ParserError::InvalidFlag {
15808                flag_type: "MavModeFlag",
15809                value: tmp as u64,
15810            },
15811        )?;
15812        let tmp = buf.get_u8()?;
15813        __struct.system_status =
15814            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15815                enum_type: "MavState",
15816                value: tmp as u64,
15817            })?;
15818        __struct.mavlink_version = buf.get_u8()?;
15819        Ok(__struct)
15820    }
15821    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15822        let mut __tmp = BytesMut::new(bytes);
15823        #[allow(clippy::absurd_extreme_comparisons)]
15824        #[allow(unused_comparisons)]
15825        if __tmp.remaining() < Self::ENCODED_LEN {
15826            panic!(
15827                "buffer is too small (need {} bytes, but got {})",
15828                Self::ENCODED_LEN,
15829                __tmp.remaining(),
15830            )
15831        }
15832        __tmp.put_u32_le(self.custom_mode);
15833        __tmp.put_u8(self.mavtype as u8);
15834        __tmp.put_u8(self.autopilot as u8);
15835        __tmp.put_u8(self.base_mode.bits() as u8);
15836        __tmp.put_u8(self.system_status as u8);
15837        __tmp.put_u8(self.mavlink_version);
15838        if matches!(version, MavlinkVersion::V2) {
15839            let len = __tmp.len();
15840            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15841        } else {
15842            __tmp.len()
15843        }
15844    }
15845}
15846#[doc = "The IMU readings in SI units in NED body frame."]
15847#[doc = ""]
15848#[doc = "ID: 105"]
15849#[derive(Debug, Clone, PartialEq)]
15850#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15851#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15852#[cfg_attr(feature = "ts", derive(TS))]
15853#[cfg_attr(feature = "ts", ts(export))]
15854pub struct HIGHRES_IMU_DATA {
15855    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15856    pub time_usec: u64,
15857    #[doc = "X acceleration"]
15858    pub xacc: f32,
15859    #[doc = "Y acceleration"]
15860    pub yacc: f32,
15861    #[doc = "Z acceleration"]
15862    pub zacc: f32,
15863    #[doc = "Angular speed around X axis"]
15864    pub xgyro: f32,
15865    #[doc = "Angular speed around Y axis"]
15866    pub ygyro: f32,
15867    #[doc = "Angular speed around Z axis"]
15868    pub zgyro: f32,
15869    #[doc = "X Magnetic field"]
15870    pub xmag: f32,
15871    #[doc = "Y Magnetic field"]
15872    pub ymag: f32,
15873    #[doc = "Z Magnetic field"]
15874    pub zmag: f32,
15875    #[doc = "Absolute pressure"]
15876    pub abs_pressure: f32,
15877    #[doc = "Differential pressure"]
15878    pub diff_pressure: f32,
15879    #[doc = "Altitude calculated from pressure"]
15880    pub pressure_alt: f32,
15881    #[doc = "Temperature"]
15882    pub temperature: f32,
15883    #[doc = "Bitmap for fields that have updated since last message"]
15884    pub fields_updated: HighresImuUpdatedFlags,
15885    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
15886    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15887    pub id: u8,
15888}
15889impl HIGHRES_IMU_DATA {
15890    pub const ENCODED_LEN: usize = 63usize;
15891    pub const DEFAULT: Self = Self {
15892        time_usec: 0_u64,
15893        xacc: 0.0_f32,
15894        yacc: 0.0_f32,
15895        zacc: 0.0_f32,
15896        xgyro: 0.0_f32,
15897        ygyro: 0.0_f32,
15898        zgyro: 0.0_f32,
15899        xmag: 0.0_f32,
15900        ymag: 0.0_f32,
15901        zmag: 0.0_f32,
15902        abs_pressure: 0.0_f32,
15903        diff_pressure: 0.0_f32,
15904        pressure_alt: 0.0_f32,
15905        temperature: 0.0_f32,
15906        fields_updated: HighresImuUpdatedFlags::DEFAULT,
15907        id: 0_u8,
15908    };
15909    #[cfg(feature = "arbitrary")]
15910    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15911        use arbitrary::{Arbitrary, Unstructured};
15912        let mut buf = [0u8; 1024];
15913        rng.fill_bytes(&mut buf);
15914        let mut unstructured = Unstructured::new(&buf);
15915        Self::arbitrary(&mut unstructured).unwrap_or_default()
15916    }
15917}
15918impl Default for HIGHRES_IMU_DATA {
15919    fn default() -> Self {
15920        Self::DEFAULT.clone()
15921    }
15922}
15923impl MessageData for HIGHRES_IMU_DATA {
15924    type Message = MavMessage;
15925    const ID: u32 = 105u32;
15926    const NAME: &'static str = "HIGHRES_IMU";
15927    const EXTRA_CRC: u8 = 93u8;
15928    const ENCODED_LEN: usize = 63usize;
15929    fn deser(
15930        _version: MavlinkVersion,
15931        __input: &[u8],
15932    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15933        let avail_len = __input.len();
15934        let mut payload_buf = [0; Self::ENCODED_LEN];
15935        let mut buf = if avail_len < Self::ENCODED_LEN {
15936            payload_buf[0..avail_len].copy_from_slice(__input);
15937            Bytes::new(&payload_buf)
15938        } else {
15939            Bytes::new(__input)
15940        };
15941        let mut __struct = Self::default();
15942        __struct.time_usec = buf.get_u64_le()?;
15943        __struct.xacc = buf.get_f32_le()?;
15944        __struct.yacc = buf.get_f32_le()?;
15945        __struct.zacc = buf.get_f32_le()?;
15946        __struct.xgyro = buf.get_f32_le()?;
15947        __struct.ygyro = buf.get_f32_le()?;
15948        __struct.zgyro = buf.get_f32_le()?;
15949        __struct.xmag = buf.get_f32_le()?;
15950        __struct.ymag = buf.get_f32_le()?;
15951        __struct.zmag = buf.get_f32_le()?;
15952        __struct.abs_pressure = buf.get_f32_le()?;
15953        __struct.diff_pressure = buf.get_f32_le()?;
15954        __struct.pressure_alt = buf.get_f32_le()?;
15955        __struct.temperature = buf.get_f32_le()?;
15956        let tmp = buf.get_u16_le()?;
15957        __struct.fields_updated =
15958            HighresImuUpdatedFlags::from_bits(tmp as <HighresImuUpdatedFlags as Flags>::Bits)
15959                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15960                    flag_type: "HighresImuUpdatedFlags",
15961                    value: tmp as u64,
15962                })?;
15963        __struct.id = buf.get_u8()?;
15964        Ok(__struct)
15965    }
15966    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15967        let mut __tmp = BytesMut::new(bytes);
15968        #[allow(clippy::absurd_extreme_comparisons)]
15969        #[allow(unused_comparisons)]
15970        if __tmp.remaining() < Self::ENCODED_LEN {
15971            panic!(
15972                "buffer is too small (need {} bytes, but got {})",
15973                Self::ENCODED_LEN,
15974                __tmp.remaining(),
15975            )
15976        }
15977        __tmp.put_u64_le(self.time_usec);
15978        __tmp.put_f32_le(self.xacc);
15979        __tmp.put_f32_le(self.yacc);
15980        __tmp.put_f32_le(self.zacc);
15981        __tmp.put_f32_le(self.xgyro);
15982        __tmp.put_f32_le(self.ygyro);
15983        __tmp.put_f32_le(self.zgyro);
15984        __tmp.put_f32_le(self.xmag);
15985        __tmp.put_f32_le(self.ymag);
15986        __tmp.put_f32_le(self.zmag);
15987        __tmp.put_f32_le(self.abs_pressure);
15988        __tmp.put_f32_le(self.diff_pressure);
15989        __tmp.put_f32_le(self.pressure_alt);
15990        __tmp.put_f32_le(self.temperature);
15991        __tmp.put_u16_le(self.fields_updated.bits() as u16);
15992        if matches!(version, MavlinkVersion::V2) {
15993            __tmp.put_u8(self.id);
15994            let len = __tmp.len();
15995            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15996        } else {
15997            __tmp.len()
15998        }
15999    }
16000}
16001#[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
16002#[doc = "Message appropriate for high latency connections like Iridium."]
16003#[doc = ""]
16004#[doc = "ID: 234"]
16005#[derive(Debug, Clone, PartialEq)]
16006#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16007#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16008#[cfg_attr(feature = "ts", derive(TS))]
16009#[cfg_attr(feature = "ts", ts(export))]
16010pub struct HIGH_LATENCY_DATA {
16011    #[doc = "A bitfield for use for autopilot-specific flags."]
16012    pub custom_mode: u32,
16013    #[doc = "Latitude"]
16014    pub latitude: i32,
16015    #[doc = "Longitude"]
16016    pub longitude: i32,
16017    #[doc = "roll"]
16018    pub roll: i16,
16019    #[doc = "pitch"]
16020    pub pitch: i16,
16021    #[doc = "heading"]
16022    pub heading: u16,
16023    #[doc = "heading setpoint"]
16024    pub heading_sp: i16,
16025    #[doc = "Altitude above mean sea level"]
16026    pub altitude_amsl: i16,
16027    #[doc = "Altitude setpoint relative to the home position"]
16028    pub altitude_sp: i16,
16029    #[doc = "distance to target"]
16030    pub wp_distance: u16,
16031    #[doc = "Bitmap of enabled system modes."]
16032    pub base_mode: MavModeFlag,
16033    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
16034    pub landed_state: MavLandedState,
16035    #[doc = "throttle (percentage)"]
16036    pub throttle: i8,
16037    #[doc = "airspeed"]
16038    pub airspeed: u8,
16039    #[doc = "airspeed setpoint"]
16040    pub airspeed_sp: u8,
16041    #[doc = "groundspeed"]
16042    pub groundspeed: u8,
16043    #[doc = "climb rate"]
16044    pub climb_rate: i8,
16045    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
16046    pub gps_nsat: u8,
16047    #[doc = "GPS Fix type."]
16048    pub gps_fix_type: GpsFixType,
16049    #[doc = "Remaining battery (percentage)"]
16050    pub battery_remaining: u8,
16051    #[doc = "Autopilot temperature (degrees C)"]
16052    pub temperature: i8,
16053    #[doc = "Air temperature (degrees C) from airspeed sensor"]
16054    pub temperature_air: i8,
16055    #[doc = "failsafe (each bit represents a failsafe where 0=ok, 1=failsafe active (bit0:RC, bit1:batt, bit2:GPS, bit3:GCS, bit4:fence)"]
16056    pub failsafe: u8,
16057    #[doc = "current waypoint number"]
16058    pub wp_num: u8,
16059}
16060impl HIGH_LATENCY_DATA {
16061    pub const ENCODED_LEN: usize = 40usize;
16062    pub const DEFAULT: Self = Self {
16063        custom_mode: 0_u32,
16064        latitude: 0_i32,
16065        longitude: 0_i32,
16066        roll: 0_i16,
16067        pitch: 0_i16,
16068        heading: 0_u16,
16069        heading_sp: 0_i16,
16070        altitude_amsl: 0_i16,
16071        altitude_sp: 0_i16,
16072        wp_distance: 0_u16,
16073        base_mode: MavModeFlag::DEFAULT,
16074        landed_state: MavLandedState::DEFAULT,
16075        throttle: 0_i8,
16076        airspeed: 0_u8,
16077        airspeed_sp: 0_u8,
16078        groundspeed: 0_u8,
16079        climb_rate: 0_i8,
16080        gps_nsat: 0_u8,
16081        gps_fix_type: GpsFixType::DEFAULT,
16082        battery_remaining: 0_u8,
16083        temperature: 0_i8,
16084        temperature_air: 0_i8,
16085        failsafe: 0_u8,
16086        wp_num: 0_u8,
16087    };
16088    #[cfg(feature = "arbitrary")]
16089    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16090        use arbitrary::{Arbitrary, Unstructured};
16091        let mut buf = [0u8; 1024];
16092        rng.fill_bytes(&mut buf);
16093        let mut unstructured = Unstructured::new(&buf);
16094        Self::arbitrary(&mut unstructured).unwrap_or_default()
16095    }
16096}
16097impl Default for HIGH_LATENCY_DATA {
16098    fn default() -> Self {
16099        Self::DEFAULT.clone()
16100    }
16101}
16102impl MessageData for HIGH_LATENCY_DATA {
16103    type Message = MavMessage;
16104    const ID: u32 = 234u32;
16105    const NAME: &'static str = "HIGH_LATENCY";
16106    const EXTRA_CRC: u8 = 150u8;
16107    const ENCODED_LEN: usize = 40usize;
16108    fn deser(
16109        _version: MavlinkVersion,
16110        __input: &[u8],
16111    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16112        let avail_len = __input.len();
16113        let mut payload_buf = [0; Self::ENCODED_LEN];
16114        let mut buf = if avail_len < Self::ENCODED_LEN {
16115            payload_buf[0..avail_len].copy_from_slice(__input);
16116            Bytes::new(&payload_buf)
16117        } else {
16118            Bytes::new(__input)
16119        };
16120        let mut __struct = Self::default();
16121        __struct.custom_mode = buf.get_u32_le()?;
16122        __struct.latitude = buf.get_i32_le()?;
16123        __struct.longitude = buf.get_i32_le()?;
16124        __struct.roll = buf.get_i16_le()?;
16125        __struct.pitch = buf.get_i16_le()?;
16126        __struct.heading = buf.get_u16_le()?;
16127        __struct.heading_sp = buf.get_i16_le()?;
16128        __struct.altitude_amsl = buf.get_i16_le()?;
16129        __struct.altitude_sp = buf.get_i16_le()?;
16130        __struct.wp_distance = buf.get_u16_le()?;
16131        let tmp = buf.get_u8()?;
16132        __struct.base_mode = MavModeFlag::from_bits(tmp as <MavModeFlag as Flags>::Bits).ok_or(
16133            ::mavlink_core::error::ParserError::InvalidFlag {
16134                flag_type: "MavModeFlag",
16135                value: tmp as u64,
16136            },
16137        )?;
16138        let tmp = buf.get_u8()?;
16139        __struct.landed_state =
16140            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16141                enum_type: "MavLandedState",
16142                value: tmp as u64,
16143            })?;
16144        __struct.throttle = buf.get_i8()?;
16145        __struct.airspeed = buf.get_u8()?;
16146        __struct.airspeed_sp = buf.get_u8()?;
16147        __struct.groundspeed = buf.get_u8()?;
16148        __struct.climb_rate = buf.get_i8()?;
16149        __struct.gps_nsat = buf.get_u8()?;
16150        let tmp = buf.get_u8()?;
16151        __struct.gps_fix_type =
16152            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16153                enum_type: "GpsFixType",
16154                value: tmp as u64,
16155            })?;
16156        __struct.battery_remaining = buf.get_u8()?;
16157        __struct.temperature = buf.get_i8()?;
16158        __struct.temperature_air = buf.get_i8()?;
16159        __struct.failsafe = buf.get_u8()?;
16160        __struct.wp_num = buf.get_u8()?;
16161        Ok(__struct)
16162    }
16163    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16164        let mut __tmp = BytesMut::new(bytes);
16165        #[allow(clippy::absurd_extreme_comparisons)]
16166        #[allow(unused_comparisons)]
16167        if __tmp.remaining() < Self::ENCODED_LEN {
16168            panic!(
16169                "buffer is too small (need {} bytes, but got {})",
16170                Self::ENCODED_LEN,
16171                __tmp.remaining(),
16172            )
16173        }
16174        __tmp.put_u32_le(self.custom_mode);
16175        __tmp.put_i32_le(self.latitude);
16176        __tmp.put_i32_le(self.longitude);
16177        __tmp.put_i16_le(self.roll);
16178        __tmp.put_i16_le(self.pitch);
16179        __tmp.put_u16_le(self.heading);
16180        __tmp.put_i16_le(self.heading_sp);
16181        __tmp.put_i16_le(self.altitude_amsl);
16182        __tmp.put_i16_le(self.altitude_sp);
16183        __tmp.put_u16_le(self.wp_distance);
16184        __tmp.put_u8(self.base_mode.bits() as u8);
16185        __tmp.put_u8(self.landed_state as u8);
16186        __tmp.put_i8(self.throttle);
16187        __tmp.put_u8(self.airspeed);
16188        __tmp.put_u8(self.airspeed_sp);
16189        __tmp.put_u8(self.groundspeed);
16190        __tmp.put_i8(self.climb_rate);
16191        __tmp.put_u8(self.gps_nsat);
16192        __tmp.put_u8(self.gps_fix_type as u8);
16193        __tmp.put_u8(self.battery_remaining);
16194        __tmp.put_i8(self.temperature);
16195        __tmp.put_i8(self.temperature_air);
16196        __tmp.put_u8(self.failsafe);
16197        __tmp.put_u8(self.wp_num);
16198        if matches!(version, MavlinkVersion::V2) {
16199            let len = __tmp.len();
16200            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16201        } else {
16202            __tmp.len()
16203        }
16204    }
16205}
16206#[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
16207#[doc = ""]
16208#[doc = "ID: 235"]
16209#[derive(Debug, Clone, PartialEq)]
16210#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16211#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16212#[cfg_attr(feature = "ts", derive(TS))]
16213#[cfg_attr(feature = "ts", ts(export))]
16214pub struct HIGH_LATENCY2_DATA {
16215    #[doc = "Timestamp (milliseconds since boot or Unix epoch)"]
16216    pub timestamp: u32,
16217    #[doc = "Latitude"]
16218    pub latitude: i32,
16219    #[doc = "Longitude"]
16220    pub longitude: i32,
16221    #[doc = "A bitfield for use for autopilot-specific flags (2 byte version)."]
16222    pub custom_mode: u16,
16223    #[doc = "Altitude above mean sea level"]
16224    pub altitude: i16,
16225    #[doc = "Altitude setpoint"]
16226    pub target_altitude: i16,
16227    #[doc = "Distance to target waypoint or position"]
16228    pub target_distance: u16,
16229    #[doc = "Current waypoint number"]
16230    pub wp_num: u16,
16231    #[doc = "Bitmap of failure flags."]
16232    pub failure_flags: HlFailureFlag,
16233    #[doc = "Type of the MAV (quadrotor, helicopter, etc.)"]
16234    pub mavtype: MavType,
16235    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
16236    pub autopilot: MavAutopilot,
16237    #[doc = "Heading"]
16238    pub heading: u8,
16239    #[doc = "Heading setpoint"]
16240    pub target_heading: u8,
16241    #[doc = "Throttle"]
16242    pub throttle: u8,
16243    #[doc = "Airspeed"]
16244    pub airspeed: u8,
16245    #[doc = "Airspeed setpoint"]
16246    pub airspeed_sp: u8,
16247    #[doc = "Groundspeed"]
16248    pub groundspeed: u8,
16249    #[doc = "Windspeed"]
16250    pub windspeed: u8,
16251    #[doc = "Wind heading"]
16252    pub wind_heading: u8,
16253    #[doc = "Maximum error horizontal position since last message"]
16254    pub eph: u8,
16255    #[doc = "Maximum error vertical position since last message"]
16256    pub epv: u8,
16257    #[doc = "Air temperature"]
16258    pub temperature_air: i8,
16259    #[doc = "Maximum climb rate magnitude since last message"]
16260    pub climb_rate: i8,
16261    #[doc = "Battery level (-1 if field not provided)."]
16262    pub battery: i8,
16263    #[doc = "Field for custom payload."]
16264    pub custom0: i8,
16265    #[doc = "Field for custom payload."]
16266    pub custom1: i8,
16267    #[doc = "Field for custom payload."]
16268    pub custom2: i8,
16269}
16270impl HIGH_LATENCY2_DATA {
16271    pub const ENCODED_LEN: usize = 42usize;
16272    pub const DEFAULT: Self = Self {
16273        timestamp: 0_u32,
16274        latitude: 0_i32,
16275        longitude: 0_i32,
16276        custom_mode: 0_u16,
16277        altitude: 0_i16,
16278        target_altitude: 0_i16,
16279        target_distance: 0_u16,
16280        wp_num: 0_u16,
16281        failure_flags: HlFailureFlag::DEFAULT,
16282        mavtype: MavType::DEFAULT,
16283        autopilot: MavAutopilot::DEFAULT,
16284        heading: 0_u8,
16285        target_heading: 0_u8,
16286        throttle: 0_u8,
16287        airspeed: 0_u8,
16288        airspeed_sp: 0_u8,
16289        groundspeed: 0_u8,
16290        windspeed: 0_u8,
16291        wind_heading: 0_u8,
16292        eph: 0_u8,
16293        epv: 0_u8,
16294        temperature_air: 0_i8,
16295        climb_rate: 0_i8,
16296        battery: 0_i8,
16297        custom0: 0_i8,
16298        custom1: 0_i8,
16299        custom2: 0_i8,
16300    };
16301    #[cfg(feature = "arbitrary")]
16302    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16303        use arbitrary::{Arbitrary, Unstructured};
16304        let mut buf = [0u8; 1024];
16305        rng.fill_bytes(&mut buf);
16306        let mut unstructured = Unstructured::new(&buf);
16307        Self::arbitrary(&mut unstructured).unwrap_or_default()
16308    }
16309}
16310impl Default for HIGH_LATENCY2_DATA {
16311    fn default() -> Self {
16312        Self::DEFAULT.clone()
16313    }
16314}
16315impl MessageData for HIGH_LATENCY2_DATA {
16316    type Message = MavMessage;
16317    const ID: u32 = 235u32;
16318    const NAME: &'static str = "HIGH_LATENCY2";
16319    const EXTRA_CRC: u8 = 179u8;
16320    const ENCODED_LEN: usize = 42usize;
16321    fn deser(
16322        _version: MavlinkVersion,
16323        __input: &[u8],
16324    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16325        let avail_len = __input.len();
16326        let mut payload_buf = [0; Self::ENCODED_LEN];
16327        let mut buf = if avail_len < Self::ENCODED_LEN {
16328            payload_buf[0..avail_len].copy_from_slice(__input);
16329            Bytes::new(&payload_buf)
16330        } else {
16331            Bytes::new(__input)
16332        };
16333        let mut __struct = Self::default();
16334        __struct.timestamp = buf.get_u32_le()?;
16335        __struct.latitude = buf.get_i32_le()?;
16336        __struct.longitude = buf.get_i32_le()?;
16337        __struct.custom_mode = buf.get_u16_le()?;
16338        __struct.altitude = buf.get_i16_le()?;
16339        __struct.target_altitude = buf.get_i16_le()?;
16340        __struct.target_distance = buf.get_u16_le()?;
16341        __struct.wp_num = buf.get_u16_le()?;
16342        let tmp = buf.get_u16_le()?;
16343        __struct.failure_flags = HlFailureFlag::from_bits(tmp as <HlFailureFlag as Flags>::Bits)
16344            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16345                flag_type: "HlFailureFlag",
16346                value: tmp as u64,
16347            })?;
16348        let tmp = buf.get_u8()?;
16349        __struct.mavtype =
16350            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16351                enum_type: "MavType",
16352                value: tmp as u64,
16353            })?;
16354        let tmp = buf.get_u8()?;
16355        __struct.autopilot =
16356            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16357                enum_type: "MavAutopilot",
16358                value: tmp as u64,
16359            })?;
16360        __struct.heading = buf.get_u8()?;
16361        __struct.target_heading = buf.get_u8()?;
16362        __struct.throttle = buf.get_u8()?;
16363        __struct.airspeed = buf.get_u8()?;
16364        __struct.airspeed_sp = buf.get_u8()?;
16365        __struct.groundspeed = buf.get_u8()?;
16366        __struct.windspeed = buf.get_u8()?;
16367        __struct.wind_heading = buf.get_u8()?;
16368        __struct.eph = buf.get_u8()?;
16369        __struct.epv = buf.get_u8()?;
16370        __struct.temperature_air = buf.get_i8()?;
16371        __struct.climb_rate = buf.get_i8()?;
16372        __struct.battery = buf.get_i8()?;
16373        __struct.custom0 = buf.get_i8()?;
16374        __struct.custom1 = buf.get_i8()?;
16375        __struct.custom2 = buf.get_i8()?;
16376        Ok(__struct)
16377    }
16378    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16379        let mut __tmp = BytesMut::new(bytes);
16380        #[allow(clippy::absurd_extreme_comparisons)]
16381        #[allow(unused_comparisons)]
16382        if __tmp.remaining() < Self::ENCODED_LEN {
16383            panic!(
16384                "buffer is too small (need {} bytes, but got {})",
16385                Self::ENCODED_LEN,
16386                __tmp.remaining(),
16387            )
16388        }
16389        __tmp.put_u32_le(self.timestamp);
16390        __tmp.put_i32_le(self.latitude);
16391        __tmp.put_i32_le(self.longitude);
16392        __tmp.put_u16_le(self.custom_mode);
16393        __tmp.put_i16_le(self.altitude);
16394        __tmp.put_i16_le(self.target_altitude);
16395        __tmp.put_u16_le(self.target_distance);
16396        __tmp.put_u16_le(self.wp_num);
16397        __tmp.put_u16_le(self.failure_flags.bits() as u16);
16398        __tmp.put_u8(self.mavtype as u8);
16399        __tmp.put_u8(self.autopilot as u8);
16400        __tmp.put_u8(self.heading);
16401        __tmp.put_u8(self.target_heading);
16402        __tmp.put_u8(self.throttle);
16403        __tmp.put_u8(self.airspeed);
16404        __tmp.put_u8(self.airspeed_sp);
16405        __tmp.put_u8(self.groundspeed);
16406        __tmp.put_u8(self.windspeed);
16407        __tmp.put_u8(self.wind_heading);
16408        __tmp.put_u8(self.eph);
16409        __tmp.put_u8(self.epv);
16410        __tmp.put_i8(self.temperature_air);
16411        __tmp.put_i8(self.climb_rate);
16412        __tmp.put_i8(self.battery);
16413        __tmp.put_i8(self.custom0);
16414        __tmp.put_i8(self.custom1);
16415        __tmp.put_i8(self.custom2);
16416        if matches!(version, MavlinkVersion::V2) {
16417            let len = __tmp.len();
16418            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16419        } else {
16420            __tmp.len()
16421        }
16422    }
16423}
16424#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
16425#[doc = ""]
16426#[doc = "ID: 93"]
16427#[derive(Debug, Clone, PartialEq)]
16428#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16429#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16430#[cfg_attr(feature = "ts", derive(TS))]
16431#[cfg_attr(feature = "ts", ts(export))]
16432pub struct HIL_ACTUATOR_CONTROLS_DATA {
16433    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16434    pub time_usec: u64,
16435    #[doc = "Flags bitmask."]
16436    pub flags: HilActuatorControlsFlags,
16437    #[doc = "Control outputs -1 .. 1. Channel assignment depends on the simulated hardware."]
16438    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16439    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
16440    pub controls: [f32; 16],
16441    #[doc = "System mode. Includes arming state."]
16442    pub mode: MavModeFlag,
16443}
16444impl HIL_ACTUATOR_CONTROLS_DATA {
16445    pub const ENCODED_LEN: usize = 81usize;
16446    pub const DEFAULT: Self = Self {
16447        time_usec: 0_u64,
16448        flags: HilActuatorControlsFlags::DEFAULT,
16449        controls: [0.0_f32; 16usize],
16450        mode: MavModeFlag::DEFAULT,
16451    };
16452    #[cfg(feature = "arbitrary")]
16453    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16454        use arbitrary::{Arbitrary, Unstructured};
16455        let mut buf = [0u8; 1024];
16456        rng.fill_bytes(&mut buf);
16457        let mut unstructured = Unstructured::new(&buf);
16458        Self::arbitrary(&mut unstructured).unwrap_or_default()
16459    }
16460}
16461impl Default for HIL_ACTUATOR_CONTROLS_DATA {
16462    fn default() -> Self {
16463        Self::DEFAULT.clone()
16464    }
16465}
16466impl MessageData for HIL_ACTUATOR_CONTROLS_DATA {
16467    type Message = MavMessage;
16468    const ID: u32 = 93u32;
16469    const NAME: &'static str = "HIL_ACTUATOR_CONTROLS";
16470    const EXTRA_CRC: u8 = 47u8;
16471    const ENCODED_LEN: usize = 81usize;
16472    fn deser(
16473        _version: MavlinkVersion,
16474        __input: &[u8],
16475    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16476        let avail_len = __input.len();
16477        let mut payload_buf = [0; Self::ENCODED_LEN];
16478        let mut buf = if avail_len < Self::ENCODED_LEN {
16479            payload_buf[0..avail_len].copy_from_slice(__input);
16480            Bytes::new(&payload_buf)
16481        } else {
16482            Bytes::new(__input)
16483        };
16484        let mut __struct = Self::default();
16485        __struct.time_usec = buf.get_u64_le()?;
16486        let tmp = buf.get_u64_le()?;
16487        __struct.flags =
16488            HilActuatorControlsFlags::from_bits(tmp as <HilActuatorControlsFlags as Flags>::Bits)
16489                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16490                flag_type: "HilActuatorControlsFlags",
16491                value: tmp as u64,
16492            })?;
16493        for v in &mut __struct.controls {
16494            let val = buf.get_f32_le()?;
16495            *v = val;
16496        }
16497        let tmp = buf.get_u8()?;
16498        __struct.mode = MavModeFlag::from_bits(tmp as <MavModeFlag as Flags>::Bits).ok_or(
16499            ::mavlink_core::error::ParserError::InvalidFlag {
16500                flag_type: "MavModeFlag",
16501                value: tmp as u64,
16502            },
16503        )?;
16504        Ok(__struct)
16505    }
16506    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16507        let mut __tmp = BytesMut::new(bytes);
16508        #[allow(clippy::absurd_extreme_comparisons)]
16509        #[allow(unused_comparisons)]
16510        if __tmp.remaining() < Self::ENCODED_LEN {
16511            panic!(
16512                "buffer is too small (need {} bytes, but got {})",
16513                Self::ENCODED_LEN,
16514                __tmp.remaining(),
16515            )
16516        }
16517        __tmp.put_u64_le(self.time_usec);
16518        __tmp.put_u64_le(self.flags.bits() as u64);
16519        for val in &self.controls {
16520            __tmp.put_f32_le(*val);
16521        }
16522        __tmp.put_u8(self.mode.bits() as u8);
16523        if matches!(version, MavlinkVersion::V2) {
16524            let len = __tmp.len();
16525            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16526        } else {
16527            __tmp.len()
16528        }
16529    }
16530}
16531#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
16532#[doc = ""]
16533#[doc = "ID: 91"]
16534#[derive(Debug, Clone, PartialEq)]
16535#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16536#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16537#[cfg_attr(feature = "ts", derive(TS))]
16538#[cfg_attr(feature = "ts", ts(export))]
16539pub struct HIL_CONTROLS_DATA {
16540    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16541    pub time_usec: u64,
16542    #[doc = "Control output -1 .. 1"]
16543    pub roll_ailerons: f32,
16544    #[doc = "Control output -1 .. 1"]
16545    pub pitch_elevator: f32,
16546    #[doc = "Control output -1 .. 1"]
16547    pub yaw_rudder: f32,
16548    #[doc = "Throttle 0 .. 1"]
16549    pub throttle: f32,
16550    #[doc = "Aux 1, -1 .. 1"]
16551    pub aux1: f32,
16552    #[doc = "Aux 2, -1 .. 1"]
16553    pub aux2: f32,
16554    #[doc = "Aux 3, -1 .. 1"]
16555    pub aux3: f32,
16556    #[doc = "Aux 4, -1 .. 1"]
16557    pub aux4: f32,
16558    #[doc = "System mode."]
16559    pub mode: MavMode,
16560    #[doc = "Navigation mode (MAV_NAV_MODE)"]
16561    pub nav_mode: u8,
16562}
16563impl HIL_CONTROLS_DATA {
16564    pub const ENCODED_LEN: usize = 42usize;
16565    pub const DEFAULT: Self = Self {
16566        time_usec: 0_u64,
16567        roll_ailerons: 0.0_f32,
16568        pitch_elevator: 0.0_f32,
16569        yaw_rudder: 0.0_f32,
16570        throttle: 0.0_f32,
16571        aux1: 0.0_f32,
16572        aux2: 0.0_f32,
16573        aux3: 0.0_f32,
16574        aux4: 0.0_f32,
16575        mode: MavMode::DEFAULT,
16576        nav_mode: 0_u8,
16577    };
16578    #[cfg(feature = "arbitrary")]
16579    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16580        use arbitrary::{Arbitrary, Unstructured};
16581        let mut buf = [0u8; 1024];
16582        rng.fill_bytes(&mut buf);
16583        let mut unstructured = Unstructured::new(&buf);
16584        Self::arbitrary(&mut unstructured).unwrap_or_default()
16585    }
16586}
16587impl Default for HIL_CONTROLS_DATA {
16588    fn default() -> Self {
16589        Self::DEFAULT.clone()
16590    }
16591}
16592impl MessageData for HIL_CONTROLS_DATA {
16593    type Message = MavMessage;
16594    const ID: u32 = 91u32;
16595    const NAME: &'static str = "HIL_CONTROLS";
16596    const EXTRA_CRC: u8 = 63u8;
16597    const ENCODED_LEN: usize = 42usize;
16598    fn deser(
16599        _version: MavlinkVersion,
16600        __input: &[u8],
16601    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16602        let avail_len = __input.len();
16603        let mut payload_buf = [0; Self::ENCODED_LEN];
16604        let mut buf = if avail_len < Self::ENCODED_LEN {
16605            payload_buf[0..avail_len].copy_from_slice(__input);
16606            Bytes::new(&payload_buf)
16607        } else {
16608            Bytes::new(__input)
16609        };
16610        let mut __struct = Self::default();
16611        __struct.time_usec = buf.get_u64_le()?;
16612        __struct.roll_ailerons = buf.get_f32_le()?;
16613        __struct.pitch_elevator = buf.get_f32_le()?;
16614        __struct.yaw_rudder = buf.get_f32_le()?;
16615        __struct.throttle = buf.get_f32_le()?;
16616        __struct.aux1 = buf.get_f32_le()?;
16617        __struct.aux2 = buf.get_f32_le()?;
16618        __struct.aux3 = buf.get_f32_le()?;
16619        __struct.aux4 = buf.get_f32_le()?;
16620        let tmp = buf.get_u8()?;
16621        __struct.mode =
16622            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16623                enum_type: "MavMode",
16624                value: tmp as u64,
16625            })?;
16626        __struct.nav_mode = buf.get_u8()?;
16627        Ok(__struct)
16628    }
16629    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16630        let mut __tmp = BytesMut::new(bytes);
16631        #[allow(clippy::absurd_extreme_comparisons)]
16632        #[allow(unused_comparisons)]
16633        if __tmp.remaining() < Self::ENCODED_LEN {
16634            panic!(
16635                "buffer is too small (need {} bytes, but got {})",
16636                Self::ENCODED_LEN,
16637                __tmp.remaining(),
16638            )
16639        }
16640        __tmp.put_u64_le(self.time_usec);
16641        __tmp.put_f32_le(self.roll_ailerons);
16642        __tmp.put_f32_le(self.pitch_elevator);
16643        __tmp.put_f32_le(self.yaw_rudder);
16644        __tmp.put_f32_le(self.throttle);
16645        __tmp.put_f32_le(self.aux1);
16646        __tmp.put_f32_le(self.aux2);
16647        __tmp.put_f32_le(self.aux3);
16648        __tmp.put_f32_le(self.aux4);
16649        __tmp.put_u8(self.mode as u8);
16650        __tmp.put_u8(self.nav_mode);
16651        if matches!(version, MavlinkVersion::V2) {
16652            let len = __tmp.len();
16653            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16654        } else {
16655            __tmp.len()
16656        }
16657    }
16658}
16659#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
16660#[doc = ""]
16661#[doc = "ID: 113"]
16662#[derive(Debug, Clone, PartialEq)]
16663#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16664#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16665#[cfg_attr(feature = "ts", derive(TS))]
16666#[cfg_attr(feature = "ts", ts(export))]
16667pub struct HIL_GPS_DATA {
16668    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16669    pub time_usec: u64,
16670    #[doc = "Latitude (WGS84)"]
16671    pub lat: i32,
16672    #[doc = "Longitude (WGS84)"]
16673    pub lon: i32,
16674    #[doc = "Altitude (MSL). Positive for up."]
16675    pub alt: i32,
16676    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
16677    pub eph: u16,
16678    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
16679    pub epv: u16,
16680    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
16681    pub vel: u16,
16682    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
16683    pub vn: i16,
16684    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
16685    pub ve: i16,
16686    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
16687    pub vd: i16,
16688    #[doc = "Course over ground (NOT heading, but direction of movement), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
16689    pub cog: u16,
16690    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix."]
16691    pub fix_type: u8,
16692    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
16693    pub satellites_visible: u8,
16694    #[doc = "GPS ID (zero indexed). Used for multiple GPS inputs"]
16695    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16696    pub id: u8,
16697    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
16698    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16699    pub yaw: u16,
16700}
16701impl HIL_GPS_DATA {
16702    pub const ENCODED_LEN: usize = 39usize;
16703    pub const DEFAULT: Self = Self {
16704        time_usec: 0_u64,
16705        lat: 0_i32,
16706        lon: 0_i32,
16707        alt: 0_i32,
16708        eph: 0_u16,
16709        epv: 0_u16,
16710        vel: 0_u16,
16711        vn: 0_i16,
16712        ve: 0_i16,
16713        vd: 0_i16,
16714        cog: 0_u16,
16715        fix_type: 0_u8,
16716        satellites_visible: 0_u8,
16717        id: 0_u8,
16718        yaw: 0_u16,
16719    };
16720    #[cfg(feature = "arbitrary")]
16721    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16722        use arbitrary::{Arbitrary, Unstructured};
16723        let mut buf = [0u8; 1024];
16724        rng.fill_bytes(&mut buf);
16725        let mut unstructured = Unstructured::new(&buf);
16726        Self::arbitrary(&mut unstructured).unwrap_or_default()
16727    }
16728}
16729impl Default for HIL_GPS_DATA {
16730    fn default() -> Self {
16731        Self::DEFAULT.clone()
16732    }
16733}
16734impl MessageData for HIL_GPS_DATA {
16735    type Message = MavMessage;
16736    const ID: u32 = 113u32;
16737    const NAME: &'static str = "HIL_GPS";
16738    const EXTRA_CRC: u8 = 124u8;
16739    const ENCODED_LEN: usize = 39usize;
16740    fn deser(
16741        _version: MavlinkVersion,
16742        __input: &[u8],
16743    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16744        let avail_len = __input.len();
16745        let mut payload_buf = [0; Self::ENCODED_LEN];
16746        let mut buf = if avail_len < Self::ENCODED_LEN {
16747            payload_buf[0..avail_len].copy_from_slice(__input);
16748            Bytes::new(&payload_buf)
16749        } else {
16750            Bytes::new(__input)
16751        };
16752        let mut __struct = Self::default();
16753        __struct.time_usec = buf.get_u64_le()?;
16754        __struct.lat = buf.get_i32_le()?;
16755        __struct.lon = buf.get_i32_le()?;
16756        __struct.alt = buf.get_i32_le()?;
16757        __struct.eph = buf.get_u16_le()?;
16758        __struct.epv = buf.get_u16_le()?;
16759        __struct.vel = buf.get_u16_le()?;
16760        __struct.vn = buf.get_i16_le()?;
16761        __struct.ve = buf.get_i16_le()?;
16762        __struct.vd = buf.get_i16_le()?;
16763        __struct.cog = buf.get_u16_le()?;
16764        __struct.fix_type = buf.get_u8()?;
16765        __struct.satellites_visible = buf.get_u8()?;
16766        __struct.id = buf.get_u8()?;
16767        __struct.yaw = buf.get_u16_le()?;
16768        Ok(__struct)
16769    }
16770    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16771        let mut __tmp = BytesMut::new(bytes);
16772        #[allow(clippy::absurd_extreme_comparisons)]
16773        #[allow(unused_comparisons)]
16774        if __tmp.remaining() < Self::ENCODED_LEN {
16775            panic!(
16776                "buffer is too small (need {} bytes, but got {})",
16777                Self::ENCODED_LEN,
16778                __tmp.remaining(),
16779            )
16780        }
16781        __tmp.put_u64_le(self.time_usec);
16782        __tmp.put_i32_le(self.lat);
16783        __tmp.put_i32_le(self.lon);
16784        __tmp.put_i32_le(self.alt);
16785        __tmp.put_u16_le(self.eph);
16786        __tmp.put_u16_le(self.epv);
16787        __tmp.put_u16_le(self.vel);
16788        __tmp.put_i16_le(self.vn);
16789        __tmp.put_i16_le(self.ve);
16790        __tmp.put_i16_le(self.vd);
16791        __tmp.put_u16_le(self.cog);
16792        __tmp.put_u8(self.fix_type);
16793        __tmp.put_u8(self.satellites_visible);
16794        if matches!(version, MavlinkVersion::V2) {
16795            __tmp.put_u8(self.id);
16796            __tmp.put_u16_le(self.yaw);
16797            let len = __tmp.len();
16798            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16799        } else {
16800            __tmp.len()
16801        }
16802    }
16803}
16804#[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
16805#[doc = ""]
16806#[doc = "ID: 114"]
16807#[derive(Debug, Clone, PartialEq)]
16808#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16809#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16810#[cfg_attr(feature = "ts", derive(TS))]
16811#[cfg_attr(feature = "ts", ts(export))]
16812pub struct HIL_OPTICAL_FLOW_DATA {
16813    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16814    pub time_usec: u64,
16815    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
16816    pub integration_time_us: u32,
16817    #[doc = "Flow in radians around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
16818    pub integrated_x: f32,
16819    #[doc = "Flow in radians around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
16820    pub integrated_y: f32,
16821    #[doc = "RH rotation around X axis"]
16822    pub integrated_xgyro: f32,
16823    #[doc = "RH rotation around Y axis"]
16824    pub integrated_ygyro: f32,
16825    #[doc = "RH rotation around Z axis"]
16826    pub integrated_zgyro: f32,
16827    #[doc = "Time since the distance was sampled."]
16828    pub time_delta_distance_us: u32,
16829    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
16830    pub distance: f32,
16831    #[doc = "Temperature"]
16832    pub temperature: i16,
16833    #[doc = "Sensor ID"]
16834    pub sensor_id: u8,
16835    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
16836    pub quality: u8,
16837}
16838impl HIL_OPTICAL_FLOW_DATA {
16839    pub const ENCODED_LEN: usize = 44usize;
16840    pub const DEFAULT: Self = Self {
16841        time_usec: 0_u64,
16842        integration_time_us: 0_u32,
16843        integrated_x: 0.0_f32,
16844        integrated_y: 0.0_f32,
16845        integrated_xgyro: 0.0_f32,
16846        integrated_ygyro: 0.0_f32,
16847        integrated_zgyro: 0.0_f32,
16848        time_delta_distance_us: 0_u32,
16849        distance: 0.0_f32,
16850        temperature: 0_i16,
16851        sensor_id: 0_u8,
16852        quality: 0_u8,
16853    };
16854    #[cfg(feature = "arbitrary")]
16855    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16856        use arbitrary::{Arbitrary, Unstructured};
16857        let mut buf = [0u8; 1024];
16858        rng.fill_bytes(&mut buf);
16859        let mut unstructured = Unstructured::new(&buf);
16860        Self::arbitrary(&mut unstructured).unwrap_or_default()
16861    }
16862}
16863impl Default for HIL_OPTICAL_FLOW_DATA {
16864    fn default() -> Self {
16865        Self::DEFAULT.clone()
16866    }
16867}
16868impl MessageData for HIL_OPTICAL_FLOW_DATA {
16869    type Message = MavMessage;
16870    const ID: u32 = 114u32;
16871    const NAME: &'static str = "HIL_OPTICAL_FLOW";
16872    const EXTRA_CRC: u8 = 237u8;
16873    const ENCODED_LEN: usize = 44usize;
16874    fn deser(
16875        _version: MavlinkVersion,
16876        __input: &[u8],
16877    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16878        let avail_len = __input.len();
16879        let mut payload_buf = [0; Self::ENCODED_LEN];
16880        let mut buf = if avail_len < Self::ENCODED_LEN {
16881            payload_buf[0..avail_len].copy_from_slice(__input);
16882            Bytes::new(&payload_buf)
16883        } else {
16884            Bytes::new(__input)
16885        };
16886        let mut __struct = Self::default();
16887        __struct.time_usec = buf.get_u64_le()?;
16888        __struct.integration_time_us = buf.get_u32_le()?;
16889        __struct.integrated_x = buf.get_f32_le()?;
16890        __struct.integrated_y = buf.get_f32_le()?;
16891        __struct.integrated_xgyro = buf.get_f32_le()?;
16892        __struct.integrated_ygyro = buf.get_f32_le()?;
16893        __struct.integrated_zgyro = buf.get_f32_le()?;
16894        __struct.time_delta_distance_us = buf.get_u32_le()?;
16895        __struct.distance = buf.get_f32_le()?;
16896        __struct.temperature = buf.get_i16_le()?;
16897        __struct.sensor_id = buf.get_u8()?;
16898        __struct.quality = buf.get_u8()?;
16899        Ok(__struct)
16900    }
16901    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16902        let mut __tmp = BytesMut::new(bytes);
16903        #[allow(clippy::absurd_extreme_comparisons)]
16904        #[allow(unused_comparisons)]
16905        if __tmp.remaining() < Self::ENCODED_LEN {
16906            panic!(
16907                "buffer is too small (need {} bytes, but got {})",
16908                Self::ENCODED_LEN,
16909                __tmp.remaining(),
16910            )
16911        }
16912        __tmp.put_u64_le(self.time_usec);
16913        __tmp.put_u32_le(self.integration_time_us);
16914        __tmp.put_f32_le(self.integrated_x);
16915        __tmp.put_f32_le(self.integrated_y);
16916        __tmp.put_f32_le(self.integrated_xgyro);
16917        __tmp.put_f32_le(self.integrated_ygyro);
16918        __tmp.put_f32_le(self.integrated_zgyro);
16919        __tmp.put_u32_le(self.time_delta_distance_us);
16920        __tmp.put_f32_le(self.distance);
16921        __tmp.put_i16_le(self.temperature);
16922        __tmp.put_u8(self.sensor_id);
16923        __tmp.put_u8(self.quality);
16924        if matches!(version, MavlinkVersion::V2) {
16925            let len = __tmp.len();
16926            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16927        } else {
16928            __tmp.len()
16929        }
16930    }
16931}
16932#[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
16933#[doc = ""]
16934#[doc = "ID: 92"]
16935#[derive(Debug, Clone, PartialEq)]
16936#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16937#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16938#[cfg_attr(feature = "ts", derive(TS))]
16939#[cfg_attr(feature = "ts", ts(export))]
16940pub struct HIL_RC_INPUTS_RAW_DATA {
16941    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16942    pub time_usec: u64,
16943    #[doc = "RC channel 1 value"]
16944    pub chan1_raw: u16,
16945    #[doc = "RC channel 2 value"]
16946    pub chan2_raw: u16,
16947    #[doc = "RC channel 3 value"]
16948    pub chan3_raw: u16,
16949    #[doc = "RC channel 4 value"]
16950    pub chan4_raw: u16,
16951    #[doc = "RC channel 5 value"]
16952    pub chan5_raw: u16,
16953    #[doc = "RC channel 6 value"]
16954    pub chan6_raw: u16,
16955    #[doc = "RC channel 7 value"]
16956    pub chan7_raw: u16,
16957    #[doc = "RC channel 8 value"]
16958    pub chan8_raw: u16,
16959    #[doc = "RC channel 9 value"]
16960    pub chan9_raw: u16,
16961    #[doc = "RC channel 10 value"]
16962    pub chan10_raw: u16,
16963    #[doc = "RC channel 11 value"]
16964    pub chan11_raw: u16,
16965    #[doc = "RC channel 12 value"]
16966    pub chan12_raw: u16,
16967    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
16968    pub rssi: u8,
16969}
16970impl HIL_RC_INPUTS_RAW_DATA {
16971    pub const ENCODED_LEN: usize = 33usize;
16972    pub const DEFAULT: Self = Self {
16973        time_usec: 0_u64,
16974        chan1_raw: 0_u16,
16975        chan2_raw: 0_u16,
16976        chan3_raw: 0_u16,
16977        chan4_raw: 0_u16,
16978        chan5_raw: 0_u16,
16979        chan6_raw: 0_u16,
16980        chan7_raw: 0_u16,
16981        chan8_raw: 0_u16,
16982        chan9_raw: 0_u16,
16983        chan10_raw: 0_u16,
16984        chan11_raw: 0_u16,
16985        chan12_raw: 0_u16,
16986        rssi: 0_u8,
16987    };
16988    #[cfg(feature = "arbitrary")]
16989    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16990        use arbitrary::{Arbitrary, Unstructured};
16991        let mut buf = [0u8; 1024];
16992        rng.fill_bytes(&mut buf);
16993        let mut unstructured = Unstructured::new(&buf);
16994        Self::arbitrary(&mut unstructured).unwrap_or_default()
16995    }
16996}
16997impl Default for HIL_RC_INPUTS_RAW_DATA {
16998    fn default() -> Self {
16999        Self::DEFAULT.clone()
17000    }
17001}
17002impl MessageData for HIL_RC_INPUTS_RAW_DATA {
17003    type Message = MavMessage;
17004    const ID: u32 = 92u32;
17005    const NAME: &'static str = "HIL_RC_INPUTS_RAW";
17006    const EXTRA_CRC: u8 = 54u8;
17007    const ENCODED_LEN: usize = 33usize;
17008    fn deser(
17009        _version: MavlinkVersion,
17010        __input: &[u8],
17011    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17012        let avail_len = __input.len();
17013        let mut payload_buf = [0; Self::ENCODED_LEN];
17014        let mut buf = if avail_len < Self::ENCODED_LEN {
17015            payload_buf[0..avail_len].copy_from_slice(__input);
17016            Bytes::new(&payload_buf)
17017        } else {
17018            Bytes::new(__input)
17019        };
17020        let mut __struct = Self::default();
17021        __struct.time_usec = buf.get_u64_le()?;
17022        __struct.chan1_raw = buf.get_u16_le()?;
17023        __struct.chan2_raw = buf.get_u16_le()?;
17024        __struct.chan3_raw = buf.get_u16_le()?;
17025        __struct.chan4_raw = buf.get_u16_le()?;
17026        __struct.chan5_raw = buf.get_u16_le()?;
17027        __struct.chan6_raw = buf.get_u16_le()?;
17028        __struct.chan7_raw = buf.get_u16_le()?;
17029        __struct.chan8_raw = buf.get_u16_le()?;
17030        __struct.chan9_raw = buf.get_u16_le()?;
17031        __struct.chan10_raw = buf.get_u16_le()?;
17032        __struct.chan11_raw = buf.get_u16_le()?;
17033        __struct.chan12_raw = buf.get_u16_le()?;
17034        __struct.rssi = buf.get_u8()?;
17035        Ok(__struct)
17036    }
17037    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17038        let mut __tmp = BytesMut::new(bytes);
17039        #[allow(clippy::absurd_extreme_comparisons)]
17040        #[allow(unused_comparisons)]
17041        if __tmp.remaining() < Self::ENCODED_LEN {
17042            panic!(
17043                "buffer is too small (need {} bytes, but got {})",
17044                Self::ENCODED_LEN,
17045                __tmp.remaining(),
17046            )
17047        }
17048        __tmp.put_u64_le(self.time_usec);
17049        __tmp.put_u16_le(self.chan1_raw);
17050        __tmp.put_u16_le(self.chan2_raw);
17051        __tmp.put_u16_le(self.chan3_raw);
17052        __tmp.put_u16_le(self.chan4_raw);
17053        __tmp.put_u16_le(self.chan5_raw);
17054        __tmp.put_u16_le(self.chan6_raw);
17055        __tmp.put_u16_le(self.chan7_raw);
17056        __tmp.put_u16_le(self.chan8_raw);
17057        __tmp.put_u16_le(self.chan9_raw);
17058        __tmp.put_u16_le(self.chan10_raw);
17059        __tmp.put_u16_le(self.chan11_raw);
17060        __tmp.put_u16_le(self.chan12_raw);
17061        __tmp.put_u8(self.rssi);
17062        if matches!(version, MavlinkVersion::V2) {
17063            let len = __tmp.len();
17064            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17065        } else {
17066            __tmp.len()
17067        }
17068    }
17069}
17070#[doc = "The IMU readings in SI units in NED body frame."]
17071#[doc = ""]
17072#[doc = "ID: 107"]
17073#[derive(Debug, Clone, PartialEq)]
17074#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17075#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17076#[cfg_attr(feature = "ts", derive(TS))]
17077#[cfg_attr(feature = "ts", ts(export))]
17078pub struct HIL_SENSOR_DATA {
17079    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17080    pub time_usec: u64,
17081    #[doc = "X acceleration"]
17082    pub xacc: f32,
17083    #[doc = "Y acceleration"]
17084    pub yacc: f32,
17085    #[doc = "Z acceleration"]
17086    pub zacc: f32,
17087    #[doc = "Angular speed around X axis in body frame"]
17088    pub xgyro: f32,
17089    #[doc = "Angular speed around Y axis in body frame"]
17090    pub ygyro: f32,
17091    #[doc = "Angular speed around Z axis in body frame"]
17092    pub zgyro: f32,
17093    #[doc = "X Magnetic field"]
17094    pub xmag: f32,
17095    #[doc = "Y Magnetic field"]
17096    pub ymag: f32,
17097    #[doc = "Z Magnetic field"]
17098    pub zmag: f32,
17099    #[doc = "Absolute pressure"]
17100    pub abs_pressure: f32,
17101    #[doc = "Differential pressure (airspeed)"]
17102    pub diff_pressure: f32,
17103    #[doc = "Altitude calculated from pressure"]
17104    pub pressure_alt: f32,
17105    #[doc = "Temperature"]
17106    pub temperature: f32,
17107    #[doc = "Bitmap for fields that have updated since last message"]
17108    pub fields_updated: HilSensorUpdatedFlags,
17109    #[doc = "Sensor ID (zero indexed). Used for multiple sensor inputs"]
17110    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17111    pub id: u8,
17112}
17113impl HIL_SENSOR_DATA {
17114    pub const ENCODED_LEN: usize = 65usize;
17115    pub const DEFAULT: Self = Self {
17116        time_usec: 0_u64,
17117        xacc: 0.0_f32,
17118        yacc: 0.0_f32,
17119        zacc: 0.0_f32,
17120        xgyro: 0.0_f32,
17121        ygyro: 0.0_f32,
17122        zgyro: 0.0_f32,
17123        xmag: 0.0_f32,
17124        ymag: 0.0_f32,
17125        zmag: 0.0_f32,
17126        abs_pressure: 0.0_f32,
17127        diff_pressure: 0.0_f32,
17128        pressure_alt: 0.0_f32,
17129        temperature: 0.0_f32,
17130        fields_updated: HilSensorUpdatedFlags::DEFAULT,
17131        id: 0_u8,
17132    };
17133    #[cfg(feature = "arbitrary")]
17134    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17135        use arbitrary::{Arbitrary, Unstructured};
17136        let mut buf = [0u8; 1024];
17137        rng.fill_bytes(&mut buf);
17138        let mut unstructured = Unstructured::new(&buf);
17139        Self::arbitrary(&mut unstructured).unwrap_or_default()
17140    }
17141}
17142impl Default for HIL_SENSOR_DATA {
17143    fn default() -> Self {
17144        Self::DEFAULT.clone()
17145    }
17146}
17147impl MessageData for HIL_SENSOR_DATA {
17148    type Message = MavMessage;
17149    const ID: u32 = 107u32;
17150    const NAME: &'static str = "HIL_SENSOR";
17151    const EXTRA_CRC: u8 = 108u8;
17152    const ENCODED_LEN: usize = 65usize;
17153    fn deser(
17154        _version: MavlinkVersion,
17155        __input: &[u8],
17156    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17157        let avail_len = __input.len();
17158        let mut payload_buf = [0; Self::ENCODED_LEN];
17159        let mut buf = if avail_len < Self::ENCODED_LEN {
17160            payload_buf[0..avail_len].copy_from_slice(__input);
17161            Bytes::new(&payload_buf)
17162        } else {
17163            Bytes::new(__input)
17164        };
17165        let mut __struct = Self::default();
17166        __struct.time_usec = buf.get_u64_le()?;
17167        __struct.xacc = buf.get_f32_le()?;
17168        __struct.yacc = buf.get_f32_le()?;
17169        __struct.zacc = buf.get_f32_le()?;
17170        __struct.xgyro = buf.get_f32_le()?;
17171        __struct.ygyro = buf.get_f32_le()?;
17172        __struct.zgyro = buf.get_f32_le()?;
17173        __struct.xmag = buf.get_f32_le()?;
17174        __struct.ymag = buf.get_f32_le()?;
17175        __struct.zmag = buf.get_f32_le()?;
17176        __struct.abs_pressure = buf.get_f32_le()?;
17177        __struct.diff_pressure = buf.get_f32_le()?;
17178        __struct.pressure_alt = buf.get_f32_le()?;
17179        __struct.temperature = buf.get_f32_le()?;
17180        let tmp = buf.get_u32_le()?;
17181        __struct.fields_updated = HilSensorUpdatedFlags::from_bits(
17182            tmp as <HilSensorUpdatedFlags as Flags>::Bits,
17183        )
17184        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
17185            flag_type: "HilSensorUpdatedFlags",
17186            value: tmp as u64,
17187        })?;
17188        __struct.id = buf.get_u8()?;
17189        Ok(__struct)
17190    }
17191    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17192        let mut __tmp = BytesMut::new(bytes);
17193        #[allow(clippy::absurd_extreme_comparisons)]
17194        #[allow(unused_comparisons)]
17195        if __tmp.remaining() < Self::ENCODED_LEN {
17196            panic!(
17197                "buffer is too small (need {} bytes, but got {})",
17198                Self::ENCODED_LEN,
17199                __tmp.remaining(),
17200            )
17201        }
17202        __tmp.put_u64_le(self.time_usec);
17203        __tmp.put_f32_le(self.xacc);
17204        __tmp.put_f32_le(self.yacc);
17205        __tmp.put_f32_le(self.zacc);
17206        __tmp.put_f32_le(self.xgyro);
17207        __tmp.put_f32_le(self.ygyro);
17208        __tmp.put_f32_le(self.zgyro);
17209        __tmp.put_f32_le(self.xmag);
17210        __tmp.put_f32_le(self.ymag);
17211        __tmp.put_f32_le(self.zmag);
17212        __tmp.put_f32_le(self.abs_pressure);
17213        __tmp.put_f32_le(self.diff_pressure);
17214        __tmp.put_f32_le(self.pressure_alt);
17215        __tmp.put_f32_le(self.temperature);
17216        __tmp.put_u32_le(self.fields_updated.bits() as u32);
17217        if matches!(version, MavlinkVersion::V2) {
17218            __tmp.put_u8(self.id);
17219            let len = __tmp.len();
17220            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17221        } else {
17222            __tmp.len()
17223        }
17224    }
17225}
17226#[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
17227#[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
17228#[doc = ""]
17229#[doc = "ID: 90"]
17230#[derive(Debug, Clone, PartialEq)]
17231#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17232#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17233#[cfg_attr(feature = "ts", derive(TS))]
17234#[cfg_attr(feature = "ts", ts(export))]
17235pub struct HIL_STATE_DATA {
17236    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17237    pub time_usec: u64,
17238    #[doc = "Roll angle"]
17239    pub roll: f32,
17240    #[doc = "Pitch angle"]
17241    pub pitch: f32,
17242    #[doc = "Yaw angle"]
17243    pub yaw: f32,
17244    #[doc = "Body frame roll / phi angular speed"]
17245    pub rollspeed: f32,
17246    #[doc = "Body frame pitch / theta angular speed"]
17247    pub pitchspeed: f32,
17248    #[doc = "Body frame yaw / psi angular speed"]
17249    pub yawspeed: f32,
17250    #[doc = "Latitude"]
17251    pub lat: i32,
17252    #[doc = "Longitude"]
17253    pub lon: i32,
17254    #[doc = "Altitude"]
17255    pub alt: i32,
17256    #[doc = "Ground X Speed (Latitude)"]
17257    pub vx: i16,
17258    #[doc = "Ground Y Speed (Longitude)"]
17259    pub vy: i16,
17260    #[doc = "Ground Z Speed (Altitude)"]
17261    pub vz: i16,
17262    #[doc = "X acceleration"]
17263    pub xacc: i16,
17264    #[doc = "Y acceleration"]
17265    pub yacc: i16,
17266    #[doc = "Z acceleration"]
17267    pub zacc: i16,
17268}
17269impl HIL_STATE_DATA {
17270    pub const ENCODED_LEN: usize = 56usize;
17271    pub const DEFAULT: Self = Self {
17272        time_usec: 0_u64,
17273        roll: 0.0_f32,
17274        pitch: 0.0_f32,
17275        yaw: 0.0_f32,
17276        rollspeed: 0.0_f32,
17277        pitchspeed: 0.0_f32,
17278        yawspeed: 0.0_f32,
17279        lat: 0_i32,
17280        lon: 0_i32,
17281        alt: 0_i32,
17282        vx: 0_i16,
17283        vy: 0_i16,
17284        vz: 0_i16,
17285        xacc: 0_i16,
17286        yacc: 0_i16,
17287        zacc: 0_i16,
17288    };
17289    #[cfg(feature = "arbitrary")]
17290    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17291        use arbitrary::{Arbitrary, Unstructured};
17292        let mut buf = [0u8; 1024];
17293        rng.fill_bytes(&mut buf);
17294        let mut unstructured = Unstructured::new(&buf);
17295        Self::arbitrary(&mut unstructured).unwrap_or_default()
17296    }
17297}
17298impl Default for HIL_STATE_DATA {
17299    fn default() -> Self {
17300        Self::DEFAULT.clone()
17301    }
17302}
17303impl MessageData for HIL_STATE_DATA {
17304    type Message = MavMessage;
17305    const ID: u32 = 90u32;
17306    const NAME: &'static str = "HIL_STATE";
17307    const EXTRA_CRC: u8 = 183u8;
17308    const ENCODED_LEN: usize = 56usize;
17309    fn deser(
17310        _version: MavlinkVersion,
17311        __input: &[u8],
17312    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17313        let avail_len = __input.len();
17314        let mut payload_buf = [0; Self::ENCODED_LEN];
17315        let mut buf = if avail_len < Self::ENCODED_LEN {
17316            payload_buf[0..avail_len].copy_from_slice(__input);
17317            Bytes::new(&payload_buf)
17318        } else {
17319            Bytes::new(__input)
17320        };
17321        let mut __struct = Self::default();
17322        __struct.time_usec = buf.get_u64_le()?;
17323        __struct.roll = buf.get_f32_le()?;
17324        __struct.pitch = buf.get_f32_le()?;
17325        __struct.yaw = buf.get_f32_le()?;
17326        __struct.rollspeed = buf.get_f32_le()?;
17327        __struct.pitchspeed = buf.get_f32_le()?;
17328        __struct.yawspeed = buf.get_f32_le()?;
17329        __struct.lat = buf.get_i32_le()?;
17330        __struct.lon = buf.get_i32_le()?;
17331        __struct.alt = buf.get_i32_le()?;
17332        __struct.vx = buf.get_i16_le()?;
17333        __struct.vy = buf.get_i16_le()?;
17334        __struct.vz = buf.get_i16_le()?;
17335        __struct.xacc = buf.get_i16_le()?;
17336        __struct.yacc = buf.get_i16_le()?;
17337        __struct.zacc = buf.get_i16_le()?;
17338        Ok(__struct)
17339    }
17340    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17341        let mut __tmp = BytesMut::new(bytes);
17342        #[allow(clippy::absurd_extreme_comparisons)]
17343        #[allow(unused_comparisons)]
17344        if __tmp.remaining() < Self::ENCODED_LEN {
17345            panic!(
17346                "buffer is too small (need {} bytes, but got {})",
17347                Self::ENCODED_LEN,
17348                __tmp.remaining(),
17349            )
17350        }
17351        __tmp.put_u64_le(self.time_usec);
17352        __tmp.put_f32_le(self.roll);
17353        __tmp.put_f32_le(self.pitch);
17354        __tmp.put_f32_le(self.yaw);
17355        __tmp.put_f32_le(self.rollspeed);
17356        __tmp.put_f32_le(self.pitchspeed);
17357        __tmp.put_f32_le(self.yawspeed);
17358        __tmp.put_i32_le(self.lat);
17359        __tmp.put_i32_le(self.lon);
17360        __tmp.put_i32_le(self.alt);
17361        __tmp.put_i16_le(self.vx);
17362        __tmp.put_i16_le(self.vy);
17363        __tmp.put_i16_le(self.vz);
17364        __tmp.put_i16_le(self.xacc);
17365        __tmp.put_i16_le(self.yacc);
17366        __tmp.put_i16_le(self.zacc);
17367        if matches!(version, MavlinkVersion::V2) {
17368            let len = __tmp.len();
17369            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17370        } else {
17371            __tmp.len()
17372        }
17373    }
17374}
17375#[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
17376#[doc = ""]
17377#[doc = "ID: 115"]
17378#[derive(Debug, Clone, PartialEq)]
17379#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17380#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17381#[cfg_attr(feature = "ts", derive(TS))]
17382#[cfg_attr(feature = "ts", ts(export))]
17383pub struct HIL_STATE_QUATERNION_DATA {
17384    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17385    pub time_usec: u64,
17386    #[doc = "Vehicle attitude expressed as normalized quaternion in w, x, y, z order (with 1 0 0 0 being the null-rotation)"]
17387    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17388    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17389    pub attitude_quaternion: [f32; 4],
17390    #[doc = "Body frame roll / phi angular speed"]
17391    pub rollspeed: f32,
17392    #[doc = "Body frame pitch / theta angular speed"]
17393    pub pitchspeed: f32,
17394    #[doc = "Body frame yaw / psi angular speed"]
17395    pub yawspeed: f32,
17396    #[doc = "Latitude"]
17397    pub lat: i32,
17398    #[doc = "Longitude"]
17399    pub lon: i32,
17400    #[doc = "Altitude"]
17401    pub alt: i32,
17402    #[doc = "Ground X Speed (Latitude)"]
17403    pub vx: i16,
17404    #[doc = "Ground Y Speed (Longitude)"]
17405    pub vy: i16,
17406    #[doc = "Ground Z Speed (Altitude)"]
17407    pub vz: i16,
17408    #[doc = "Indicated airspeed"]
17409    pub ind_airspeed: u16,
17410    #[doc = "True airspeed"]
17411    pub true_airspeed: u16,
17412    #[doc = "X acceleration"]
17413    pub xacc: i16,
17414    #[doc = "Y acceleration"]
17415    pub yacc: i16,
17416    #[doc = "Z acceleration"]
17417    pub zacc: i16,
17418}
17419impl HIL_STATE_QUATERNION_DATA {
17420    pub const ENCODED_LEN: usize = 64usize;
17421    pub const DEFAULT: Self = Self {
17422        time_usec: 0_u64,
17423        attitude_quaternion: [0.0_f32; 4usize],
17424        rollspeed: 0.0_f32,
17425        pitchspeed: 0.0_f32,
17426        yawspeed: 0.0_f32,
17427        lat: 0_i32,
17428        lon: 0_i32,
17429        alt: 0_i32,
17430        vx: 0_i16,
17431        vy: 0_i16,
17432        vz: 0_i16,
17433        ind_airspeed: 0_u16,
17434        true_airspeed: 0_u16,
17435        xacc: 0_i16,
17436        yacc: 0_i16,
17437        zacc: 0_i16,
17438    };
17439    #[cfg(feature = "arbitrary")]
17440    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17441        use arbitrary::{Arbitrary, Unstructured};
17442        let mut buf = [0u8; 1024];
17443        rng.fill_bytes(&mut buf);
17444        let mut unstructured = Unstructured::new(&buf);
17445        Self::arbitrary(&mut unstructured).unwrap_or_default()
17446    }
17447}
17448impl Default for HIL_STATE_QUATERNION_DATA {
17449    fn default() -> Self {
17450        Self::DEFAULT.clone()
17451    }
17452}
17453impl MessageData for HIL_STATE_QUATERNION_DATA {
17454    type Message = MavMessage;
17455    const ID: u32 = 115u32;
17456    const NAME: &'static str = "HIL_STATE_QUATERNION";
17457    const EXTRA_CRC: u8 = 4u8;
17458    const ENCODED_LEN: usize = 64usize;
17459    fn deser(
17460        _version: MavlinkVersion,
17461        __input: &[u8],
17462    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17463        let avail_len = __input.len();
17464        let mut payload_buf = [0; Self::ENCODED_LEN];
17465        let mut buf = if avail_len < Self::ENCODED_LEN {
17466            payload_buf[0..avail_len].copy_from_slice(__input);
17467            Bytes::new(&payload_buf)
17468        } else {
17469            Bytes::new(__input)
17470        };
17471        let mut __struct = Self::default();
17472        __struct.time_usec = buf.get_u64_le()?;
17473        for v in &mut __struct.attitude_quaternion {
17474            let val = buf.get_f32_le()?;
17475            *v = val;
17476        }
17477        __struct.rollspeed = buf.get_f32_le()?;
17478        __struct.pitchspeed = buf.get_f32_le()?;
17479        __struct.yawspeed = buf.get_f32_le()?;
17480        __struct.lat = buf.get_i32_le()?;
17481        __struct.lon = buf.get_i32_le()?;
17482        __struct.alt = buf.get_i32_le()?;
17483        __struct.vx = buf.get_i16_le()?;
17484        __struct.vy = buf.get_i16_le()?;
17485        __struct.vz = buf.get_i16_le()?;
17486        __struct.ind_airspeed = buf.get_u16_le()?;
17487        __struct.true_airspeed = buf.get_u16_le()?;
17488        __struct.xacc = buf.get_i16_le()?;
17489        __struct.yacc = buf.get_i16_le()?;
17490        __struct.zacc = buf.get_i16_le()?;
17491        Ok(__struct)
17492    }
17493    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17494        let mut __tmp = BytesMut::new(bytes);
17495        #[allow(clippy::absurd_extreme_comparisons)]
17496        #[allow(unused_comparisons)]
17497        if __tmp.remaining() < Self::ENCODED_LEN {
17498            panic!(
17499                "buffer is too small (need {} bytes, but got {})",
17500                Self::ENCODED_LEN,
17501                __tmp.remaining(),
17502            )
17503        }
17504        __tmp.put_u64_le(self.time_usec);
17505        for val in &self.attitude_quaternion {
17506            __tmp.put_f32_le(*val);
17507        }
17508        __tmp.put_f32_le(self.rollspeed);
17509        __tmp.put_f32_le(self.pitchspeed);
17510        __tmp.put_f32_le(self.yawspeed);
17511        __tmp.put_i32_le(self.lat);
17512        __tmp.put_i32_le(self.lon);
17513        __tmp.put_i32_le(self.alt);
17514        __tmp.put_i16_le(self.vx);
17515        __tmp.put_i16_le(self.vy);
17516        __tmp.put_i16_le(self.vz);
17517        __tmp.put_u16_le(self.ind_airspeed);
17518        __tmp.put_u16_le(self.true_airspeed);
17519        __tmp.put_i16_le(self.xacc);
17520        __tmp.put_i16_le(self.yacc);
17521        __tmp.put_i16_le(self.zacc);
17522        if matches!(version, MavlinkVersion::V2) {
17523            let len = __tmp.len();
17524            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17525        } else {
17526            __tmp.len()
17527        }
17528    }
17529}
17530#[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
17531#[doc = ""]
17532#[doc = "ID: 242"]
17533#[derive(Debug, Clone, PartialEq)]
17534#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17535#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17536#[cfg_attr(feature = "ts", derive(TS))]
17537#[cfg_attr(feature = "ts", ts(export))]
17538pub struct HOME_POSITION_DATA {
17539    #[doc = "Latitude (WGS84)"]
17540    pub latitude: i32,
17541    #[doc = "Longitude (WGS84)"]
17542    pub longitude: i32,
17543    #[doc = "Altitude (MSL). Positive for up."]
17544    pub altitude: i32,
17545    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
17546    pub x: f32,
17547    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
17548    pub y: f32,
17549    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
17550    pub z: f32,
17551    #[doc = "Quaternion indicating world-to-surface-normal and heading transformation of the takeoff position.         Used to indicate the heading and slope of the ground.         All fields should be set to NaN if an accurate quaternion for both heading and surface slope cannot be supplied."]
17552    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17553    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
17554    pub q: [f32; 4],
17555    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
17556    pub approach_x: f32,
17557    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
17558    pub approach_y: f32,
17559    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
17560    pub approach_z: f32,
17561    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17562    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17563    pub time_usec: u64,
17564}
17565impl HOME_POSITION_DATA {
17566    pub const ENCODED_LEN: usize = 60usize;
17567    pub const DEFAULT: Self = Self {
17568        latitude: 0_i32,
17569        longitude: 0_i32,
17570        altitude: 0_i32,
17571        x: 0.0_f32,
17572        y: 0.0_f32,
17573        z: 0.0_f32,
17574        q: [0.0_f32; 4usize],
17575        approach_x: 0.0_f32,
17576        approach_y: 0.0_f32,
17577        approach_z: 0.0_f32,
17578        time_usec: 0_u64,
17579    };
17580    #[cfg(feature = "arbitrary")]
17581    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17582        use arbitrary::{Arbitrary, Unstructured};
17583        let mut buf = [0u8; 1024];
17584        rng.fill_bytes(&mut buf);
17585        let mut unstructured = Unstructured::new(&buf);
17586        Self::arbitrary(&mut unstructured).unwrap_or_default()
17587    }
17588}
17589impl Default for HOME_POSITION_DATA {
17590    fn default() -> Self {
17591        Self::DEFAULT.clone()
17592    }
17593}
17594impl MessageData for HOME_POSITION_DATA {
17595    type Message = MavMessage;
17596    const ID: u32 = 242u32;
17597    const NAME: &'static str = "HOME_POSITION";
17598    const EXTRA_CRC: u8 = 104u8;
17599    const ENCODED_LEN: usize = 60usize;
17600    fn deser(
17601        _version: MavlinkVersion,
17602        __input: &[u8],
17603    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17604        let avail_len = __input.len();
17605        let mut payload_buf = [0; Self::ENCODED_LEN];
17606        let mut buf = if avail_len < Self::ENCODED_LEN {
17607            payload_buf[0..avail_len].copy_from_slice(__input);
17608            Bytes::new(&payload_buf)
17609        } else {
17610            Bytes::new(__input)
17611        };
17612        let mut __struct = Self::default();
17613        __struct.latitude = buf.get_i32_le()?;
17614        __struct.longitude = buf.get_i32_le()?;
17615        __struct.altitude = buf.get_i32_le()?;
17616        __struct.x = buf.get_f32_le()?;
17617        __struct.y = buf.get_f32_le()?;
17618        __struct.z = buf.get_f32_le()?;
17619        for v in &mut __struct.q {
17620            let val = buf.get_f32_le()?;
17621            *v = val;
17622        }
17623        __struct.approach_x = buf.get_f32_le()?;
17624        __struct.approach_y = buf.get_f32_le()?;
17625        __struct.approach_z = buf.get_f32_le()?;
17626        __struct.time_usec = buf.get_u64_le()?;
17627        Ok(__struct)
17628    }
17629    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17630        let mut __tmp = BytesMut::new(bytes);
17631        #[allow(clippy::absurd_extreme_comparisons)]
17632        #[allow(unused_comparisons)]
17633        if __tmp.remaining() < Self::ENCODED_LEN {
17634            panic!(
17635                "buffer is too small (need {} bytes, but got {})",
17636                Self::ENCODED_LEN,
17637                __tmp.remaining(),
17638            )
17639        }
17640        __tmp.put_i32_le(self.latitude);
17641        __tmp.put_i32_le(self.longitude);
17642        __tmp.put_i32_le(self.altitude);
17643        __tmp.put_f32_le(self.x);
17644        __tmp.put_f32_le(self.y);
17645        __tmp.put_f32_le(self.z);
17646        for val in &self.q {
17647            __tmp.put_f32_le(*val);
17648        }
17649        __tmp.put_f32_le(self.approach_x);
17650        __tmp.put_f32_le(self.approach_y);
17651        __tmp.put_f32_le(self.approach_z);
17652        if matches!(version, MavlinkVersion::V2) {
17653            __tmp.put_u64_le(self.time_usec);
17654            let len = __tmp.len();
17655            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17656        } else {
17657            __tmp.len()
17658        }
17659    }
17660}
17661#[doc = "Temperature and humidity from hygrometer."]
17662#[doc = ""]
17663#[doc = "ID: 12920"]
17664#[derive(Debug, Clone, PartialEq)]
17665#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17666#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17667#[cfg_attr(feature = "ts", derive(TS))]
17668#[cfg_attr(feature = "ts", ts(export))]
17669pub struct HYGROMETER_SENSOR_DATA {
17670    #[doc = "Temperature"]
17671    pub temperature: i16,
17672    #[doc = "Humidity"]
17673    pub humidity: u16,
17674    #[doc = "Hygrometer ID"]
17675    pub id: u8,
17676}
17677impl HYGROMETER_SENSOR_DATA {
17678    pub const ENCODED_LEN: usize = 5usize;
17679    pub const DEFAULT: Self = Self {
17680        temperature: 0_i16,
17681        humidity: 0_u16,
17682        id: 0_u8,
17683    };
17684    #[cfg(feature = "arbitrary")]
17685    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17686        use arbitrary::{Arbitrary, Unstructured};
17687        let mut buf = [0u8; 1024];
17688        rng.fill_bytes(&mut buf);
17689        let mut unstructured = Unstructured::new(&buf);
17690        Self::arbitrary(&mut unstructured).unwrap_or_default()
17691    }
17692}
17693impl Default for HYGROMETER_SENSOR_DATA {
17694    fn default() -> Self {
17695        Self::DEFAULT.clone()
17696    }
17697}
17698impl MessageData for HYGROMETER_SENSOR_DATA {
17699    type Message = MavMessage;
17700    const ID: u32 = 12920u32;
17701    const NAME: &'static str = "HYGROMETER_SENSOR";
17702    const EXTRA_CRC: u8 = 20u8;
17703    const ENCODED_LEN: usize = 5usize;
17704    fn deser(
17705        _version: MavlinkVersion,
17706        __input: &[u8],
17707    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17708        let avail_len = __input.len();
17709        let mut payload_buf = [0; Self::ENCODED_LEN];
17710        let mut buf = if avail_len < Self::ENCODED_LEN {
17711            payload_buf[0..avail_len].copy_from_slice(__input);
17712            Bytes::new(&payload_buf)
17713        } else {
17714            Bytes::new(__input)
17715        };
17716        let mut __struct = Self::default();
17717        __struct.temperature = buf.get_i16_le()?;
17718        __struct.humidity = buf.get_u16_le()?;
17719        __struct.id = buf.get_u8()?;
17720        Ok(__struct)
17721    }
17722    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17723        let mut __tmp = BytesMut::new(bytes);
17724        #[allow(clippy::absurd_extreme_comparisons)]
17725        #[allow(unused_comparisons)]
17726        if __tmp.remaining() < Self::ENCODED_LEN {
17727            panic!(
17728                "buffer is too small (need {} bytes, but got {})",
17729                Self::ENCODED_LEN,
17730                __tmp.remaining(),
17731            )
17732        }
17733        __tmp.put_i16_le(self.temperature);
17734        __tmp.put_u16_le(self.humidity);
17735        __tmp.put_u8(self.id);
17736        if matches!(version, MavlinkVersion::V2) {
17737            let len = __tmp.len();
17738            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17739        } else {
17740            __tmp.len()
17741        }
17742    }
17743}
17744#[doc = "Illuminator status."]
17745#[doc = ""]
17746#[doc = "ID: 440"]
17747#[derive(Debug, Clone, PartialEq)]
17748#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17749#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17750#[cfg_attr(feature = "ts", derive(TS))]
17751#[cfg_attr(feature = "ts", ts(export))]
17752pub struct ILLUMINATOR_STATUS_DATA {
17753    #[doc = "Time since the start-up of the illuminator in ms"]
17754    pub uptime_ms: u32,
17755    #[doc = "Errors"]
17756    pub error_status: IlluminatorErrorFlags,
17757    #[doc = "Illuminator brightness"]
17758    pub brightness: f32,
17759    #[doc = "Illuminator strobing period in seconds"]
17760    pub strobe_period: f32,
17761    #[doc = "Illuminator strobing duty cycle"]
17762    pub strobe_duty_cycle: f32,
17763    #[doc = "Temperature in Celsius"]
17764    pub temp_c: f32,
17765    #[doc = "Minimum strobing period in seconds"]
17766    pub min_strobe_period: f32,
17767    #[doc = "Maximum strobing period in seconds"]
17768    pub max_strobe_period: f32,
17769    #[doc = "0: Illuminators OFF, 1: Illuminators ON"]
17770    pub enable: u8,
17771    #[doc = "Supported illuminator modes"]
17772    pub mode_bitmask: IlluminatorMode,
17773    #[doc = "Illuminator mode"]
17774    pub mode: IlluminatorMode,
17775}
17776impl ILLUMINATOR_STATUS_DATA {
17777    pub const ENCODED_LEN: usize = 35usize;
17778    pub const DEFAULT: Self = Self {
17779        uptime_ms: 0_u32,
17780        error_status: IlluminatorErrorFlags::DEFAULT,
17781        brightness: 0.0_f32,
17782        strobe_period: 0.0_f32,
17783        strobe_duty_cycle: 0.0_f32,
17784        temp_c: 0.0_f32,
17785        min_strobe_period: 0.0_f32,
17786        max_strobe_period: 0.0_f32,
17787        enable: 0_u8,
17788        mode_bitmask: IlluminatorMode::DEFAULT,
17789        mode: IlluminatorMode::DEFAULT,
17790    };
17791    #[cfg(feature = "arbitrary")]
17792    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17793        use arbitrary::{Arbitrary, Unstructured};
17794        let mut buf = [0u8; 1024];
17795        rng.fill_bytes(&mut buf);
17796        let mut unstructured = Unstructured::new(&buf);
17797        Self::arbitrary(&mut unstructured).unwrap_or_default()
17798    }
17799}
17800impl Default for ILLUMINATOR_STATUS_DATA {
17801    fn default() -> Self {
17802        Self::DEFAULT.clone()
17803    }
17804}
17805impl MessageData for ILLUMINATOR_STATUS_DATA {
17806    type Message = MavMessage;
17807    const ID: u32 = 440u32;
17808    const NAME: &'static str = "ILLUMINATOR_STATUS";
17809    const EXTRA_CRC: u8 = 66u8;
17810    const ENCODED_LEN: usize = 35usize;
17811    fn deser(
17812        _version: MavlinkVersion,
17813        __input: &[u8],
17814    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17815        let avail_len = __input.len();
17816        let mut payload_buf = [0; Self::ENCODED_LEN];
17817        let mut buf = if avail_len < Self::ENCODED_LEN {
17818            payload_buf[0..avail_len].copy_from_slice(__input);
17819            Bytes::new(&payload_buf)
17820        } else {
17821            Bytes::new(__input)
17822        };
17823        let mut __struct = Self::default();
17824        __struct.uptime_ms = buf.get_u32_le()?;
17825        let tmp = buf.get_u32_le()?;
17826        __struct.error_status = IlluminatorErrorFlags::from_bits(
17827            tmp as <IlluminatorErrorFlags as Flags>::Bits,
17828        )
17829        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
17830            flag_type: "IlluminatorErrorFlags",
17831            value: tmp as u64,
17832        })?;
17833        __struct.brightness = buf.get_f32_le()?;
17834        __struct.strobe_period = buf.get_f32_le()?;
17835        __struct.strobe_duty_cycle = buf.get_f32_le()?;
17836        __struct.temp_c = buf.get_f32_le()?;
17837        __struct.min_strobe_period = buf.get_f32_le()?;
17838        __struct.max_strobe_period = buf.get_f32_le()?;
17839        __struct.enable = buf.get_u8()?;
17840        let tmp = buf.get_u8()?;
17841        __struct.mode_bitmask =
17842            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17843                enum_type: "IlluminatorMode",
17844                value: tmp as u64,
17845            })?;
17846        let tmp = buf.get_u8()?;
17847        __struct.mode =
17848            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17849                enum_type: "IlluminatorMode",
17850                value: tmp as u64,
17851            })?;
17852        Ok(__struct)
17853    }
17854    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17855        let mut __tmp = BytesMut::new(bytes);
17856        #[allow(clippy::absurd_extreme_comparisons)]
17857        #[allow(unused_comparisons)]
17858        if __tmp.remaining() < Self::ENCODED_LEN {
17859            panic!(
17860                "buffer is too small (need {} bytes, but got {})",
17861                Self::ENCODED_LEN,
17862                __tmp.remaining(),
17863            )
17864        }
17865        __tmp.put_u32_le(self.uptime_ms);
17866        __tmp.put_u32_le(self.error_status.bits() as u32);
17867        __tmp.put_f32_le(self.brightness);
17868        __tmp.put_f32_le(self.strobe_period);
17869        __tmp.put_f32_le(self.strobe_duty_cycle);
17870        __tmp.put_f32_le(self.temp_c);
17871        __tmp.put_f32_le(self.min_strobe_period);
17872        __tmp.put_f32_le(self.max_strobe_period);
17873        __tmp.put_u8(self.enable);
17874        __tmp.put_u8(self.mode_bitmask as u8);
17875        __tmp.put_u8(self.mode as u8);
17876        if matches!(version, MavlinkVersion::V2) {
17877            let len = __tmp.len();
17878            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17879        } else {
17880            __tmp.len()
17881        }
17882    }
17883}
17884#[doc = "Status of the Iridium SBD link."]
17885#[doc = ""]
17886#[doc = "ID: 335"]
17887#[derive(Debug, Clone, PartialEq)]
17888#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17889#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17890#[cfg_attr(feature = "ts", derive(TS))]
17891#[cfg_attr(feature = "ts", ts(export))]
17892pub struct ISBD_LINK_STATUS_DATA {
17893    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17894    pub timestamp: u64,
17895    #[doc = "Timestamp of the last successful sbd session. The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17896    pub last_heartbeat: u64,
17897    #[doc = "Number of failed SBD sessions."]
17898    pub failed_sessions: u16,
17899    #[doc = "Number of successful SBD sessions."]
17900    pub successful_sessions: u16,
17901    #[doc = "Signal quality equal to the number of bars displayed on the ISU signal strength indicator. Range is 0 to 5, where 0 indicates no signal and 5 indicates maximum signal strength."]
17902    pub signal_quality: u8,
17903    #[doc = "1: Ring call pending, 0: No call pending."]
17904    pub ring_pending: u8,
17905    #[doc = "1: Transmission session pending, 0: No transmission session pending."]
17906    pub tx_session_pending: u8,
17907    #[doc = "1: Receiving session pending, 0: No receiving session pending."]
17908    pub rx_session_pending: u8,
17909}
17910impl ISBD_LINK_STATUS_DATA {
17911    pub const ENCODED_LEN: usize = 24usize;
17912    pub const DEFAULT: Self = Self {
17913        timestamp: 0_u64,
17914        last_heartbeat: 0_u64,
17915        failed_sessions: 0_u16,
17916        successful_sessions: 0_u16,
17917        signal_quality: 0_u8,
17918        ring_pending: 0_u8,
17919        tx_session_pending: 0_u8,
17920        rx_session_pending: 0_u8,
17921    };
17922    #[cfg(feature = "arbitrary")]
17923    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17924        use arbitrary::{Arbitrary, Unstructured};
17925        let mut buf = [0u8; 1024];
17926        rng.fill_bytes(&mut buf);
17927        let mut unstructured = Unstructured::new(&buf);
17928        Self::arbitrary(&mut unstructured).unwrap_or_default()
17929    }
17930}
17931impl Default for ISBD_LINK_STATUS_DATA {
17932    fn default() -> Self {
17933        Self::DEFAULT.clone()
17934    }
17935}
17936impl MessageData for ISBD_LINK_STATUS_DATA {
17937    type Message = MavMessage;
17938    const ID: u32 = 335u32;
17939    const NAME: &'static str = "ISBD_LINK_STATUS";
17940    const EXTRA_CRC: u8 = 225u8;
17941    const ENCODED_LEN: usize = 24usize;
17942    fn deser(
17943        _version: MavlinkVersion,
17944        __input: &[u8],
17945    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17946        let avail_len = __input.len();
17947        let mut payload_buf = [0; Self::ENCODED_LEN];
17948        let mut buf = if avail_len < Self::ENCODED_LEN {
17949            payload_buf[0..avail_len].copy_from_slice(__input);
17950            Bytes::new(&payload_buf)
17951        } else {
17952            Bytes::new(__input)
17953        };
17954        let mut __struct = Self::default();
17955        __struct.timestamp = buf.get_u64_le()?;
17956        __struct.last_heartbeat = buf.get_u64_le()?;
17957        __struct.failed_sessions = buf.get_u16_le()?;
17958        __struct.successful_sessions = buf.get_u16_le()?;
17959        __struct.signal_quality = buf.get_u8()?;
17960        __struct.ring_pending = buf.get_u8()?;
17961        __struct.tx_session_pending = buf.get_u8()?;
17962        __struct.rx_session_pending = buf.get_u8()?;
17963        Ok(__struct)
17964    }
17965    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17966        let mut __tmp = BytesMut::new(bytes);
17967        #[allow(clippy::absurd_extreme_comparisons)]
17968        #[allow(unused_comparisons)]
17969        if __tmp.remaining() < Self::ENCODED_LEN {
17970            panic!(
17971                "buffer is too small (need {} bytes, but got {})",
17972                Self::ENCODED_LEN,
17973                __tmp.remaining(),
17974            )
17975        }
17976        __tmp.put_u64_le(self.timestamp);
17977        __tmp.put_u64_le(self.last_heartbeat);
17978        __tmp.put_u16_le(self.failed_sessions);
17979        __tmp.put_u16_le(self.successful_sessions);
17980        __tmp.put_u8(self.signal_quality);
17981        __tmp.put_u8(self.ring_pending);
17982        __tmp.put_u8(self.tx_session_pending);
17983        __tmp.put_u8(self.rx_session_pending);
17984        if matches!(version, MavlinkVersion::V2) {
17985            let len = __tmp.len();
17986            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17987        } else {
17988            __tmp.len()
17989        }
17990    }
17991}
17992#[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
17993#[doc = ""]
17994#[doc = "ID: 149"]
17995#[derive(Debug, Clone, PartialEq)]
17996#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17997#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17998#[cfg_attr(feature = "ts", derive(TS))]
17999#[cfg_attr(feature = "ts", ts(export))]
18000pub struct LANDING_TARGET_DATA {
18001    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
18002    pub time_usec: u64,
18003    #[doc = "X-axis angular offset of the target from the center of the image"]
18004    pub angle_x: f32,
18005    #[doc = "Y-axis angular offset of the target from the center of the image"]
18006    pub angle_y: f32,
18007    #[doc = "Distance to the target from the vehicle"]
18008    pub distance: f32,
18009    #[doc = "Size of target along x-axis"]
18010    pub size_x: f32,
18011    #[doc = "Size of target along y-axis"]
18012    pub size_y: f32,
18013    #[doc = "The ID of the target if multiple targets are present"]
18014    pub target_num: u8,
18015    #[doc = "Coordinate frame used for following fields."]
18016    pub frame: MavFrame,
18017    #[doc = "X Position of the landing target in MAV_FRAME"]
18018    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18019    pub x: f32,
18020    #[doc = "Y Position of the landing target in MAV_FRAME"]
18021    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18022    pub y: f32,
18023    #[doc = "Z Position of the landing target in MAV_FRAME"]
18024    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18025    pub z: f32,
18026    #[doc = "Quaternion of landing target orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
18027    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18028    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18029    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18030    pub q: [f32; 4],
18031    #[doc = "Type of landing target"]
18032    #[cfg_attr(feature = "serde", serde(default))]
18033    pub mavtype: LandingTargetType,
18034    #[doc = "Boolean indicating whether the position fields (x, y, z, q, type) contain valid target position information (valid: 1, invalid: 0). Default is 0 (invalid)."]
18035    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18036    pub position_valid: u8,
18037}
18038impl LANDING_TARGET_DATA {
18039    pub const ENCODED_LEN: usize = 60usize;
18040    pub const DEFAULT: Self = Self {
18041        time_usec: 0_u64,
18042        angle_x: 0.0_f32,
18043        angle_y: 0.0_f32,
18044        distance: 0.0_f32,
18045        size_x: 0.0_f32,
18046        size_y: 0.0_f32,
18047        target_num: 0_u8,
18048        frame: MavFrame::DEFAULT,
18049        x: 0.0_f32,
18050        y: 0.0_f32,
18051        z: 0.0_f32,
18052        q: [0.0_f32; 4usize],
18053        mavtype: LandingTargetType::DEFAULT,
18054        position_valid: 0_u8,
18055    };
18056    #[cfg(feature = "arbitrary")]
18057    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18058        use arbitrary::{Arbitrary, Unstructured};
18059        let mut buf = [0u8; 1024];
18060        rng.fill_bytes(&mut buf);
18061        let mut unstructured = Unstructured::new(&buf);
18062        Self::arbitrary(&mut unstructured).unwrap_or_default()
18063    }
18064}
18065impl Default for LANDING_TARGET_DATA {
18066    fn default() -> Self {
18067        Self::DEFAULT.clone()
18068    }
18069}
18070impl MessageData for LANDING_TARGET_DATA {
18071    type Message = MavMessage;
18072    const ID: u32 = 149u32;
18073    const NAME: &'static str = "LANDING_TARGET";
18074    const EXTRA_CRC: u8 = 200u8;
18075    const ENCODED_LEN: usize = 60usize;
18076    fn deser(
18077        _version: MavlinkVersion,
18078        __input: &[u8],
18079    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18080        let avail_len = __input.len();
18081        let mut payload_buf = [0; Self::ENCODED_LEN];
18082        let mut buf = if avail_len < Self::ENCODED_LEN {
18083            payload_buf[0..avail_len].copy_from_slice(__input);
18084            Bytes::new(&payload_buf)
18085        } else {
18086            Bytes::new(__input)
18087        };
18088        let mut __struct = Self::default();
18089        __struct.time_usec = buf.get_u64_le()?;
18090        __struct.angle_x = buf.get_f32_le()?;
18091        __struct.angle_y = buf.get_f32_le()?;
18092        __struct.distance = buf.get_f32_le()?;
18093        __struct.size_x = buf.get_f32_le()?;
18094        __struct.size_y = buf.get_f32_le()?;
18095        __struct.target_num = buf.get_u8()?;
18096        let tmp = buf.get_u8()?;
18097        __struct.frame =
18098            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18099                enum_type: "MavFrame",
18100                value: tmp as u64,
18101            })?;
18102        __struct.x = buf.get_f32_le()?;
18103        __struct.y = buf.get_f32_le()?;
18104        __struct.z = buf.get_f32_le()?;
18105        for v in &mut __struct.q {
18106            let val = buf.get_f32_le()?;
18107            *v = val;
18108        }
18109        let tmp = buf.get_u8()?;
18110        __struct.mavtype =
18111            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18112                enum_type: "LandingTargetType",
18113                value: tmp as u64,
18114            })?;
18115        __struct.position_valid = buf.get_u8()?;
18116        Ok(__struct)
18117    }
18118    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18119        let mut __tmp = BytesMut::new(bytes);
18120        #[allow(clippy::absurd_extreme_comparisons)]
18121        #[allow(unused_comparisons)]
18122        if __tmp.remaining() < Self::ENCODED_LEN {
18123            panic!(
18124                "buffer is too small (need {} bytes, but got {})",
18125                Self::ENCODED_LEN,
18126                __tmp.remaining(),
18127            )
18128        }
18129        __tmp.put_u64_le(self.time_usec);
18130        __tmp.put_f32_le(self.angle_x);
18131        __tmp.put_f32_le(self.angle_y);
18132        __tmp.put_f32_le(self.distance);
18133        __tmp.put_f32_le(self.size_x);
18134        __tmp.put_f32_le(self.size_y);
18135        __tmp.put_u8(self.target_num);
18136        __tmp.put_u8(self.frame as u8);
18137        if matches!(version, MavlinkVersion::V2) {
18138            __tmp.put_f32_le(self.x);
18139            __tmp.put_f32_le(self.y);
18140            __tmp.put_f32_le(self.z);
18141            for val in &self.q {
18142                __tmp.put_f32_le(*val);
18143            }
18144            __tmp.put_u8(self.mavtype as u8);
18145            __tmp.put_u8(self.position_valid);
18146            let len = __tmp.len();
18147            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18148        } else {
18149            __tmp.len()
18150        }
18151    }
18152}
18153#[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
18154#[doc = ""]
18155#[doc = "ID: 8"]
18156#[derive(Debug, Clone, PartialEq)]
18157#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18158#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18159#[cfg_attr(feature = "ts", derive(TS))]
18160#[cfg_attr(feature = "ts", ts(export))]
18161pub struct LINK_NODE_STATUS_DATA {
18162    #[doc = "Timestamp (time since system boot)."]
18163    pub timestamp: u64,
18164    #[doc = "Transmit rate"]
18165    pub tx_rate: u32,
18166    #[doc = "Receive rate"]
18167    pub rx_rate: u32,
18168    #[doc = "Messages sent"]
18169    pub messages_sent: u32,
18170    #[doc = "Messages received (estimated from counting seq)"]
18171    pub messages_received: u32,
18172    #[doc = "Messages lost (estimated from counting seq)"]
18173    pub messages_lost: u32,
18174    #[doc = "Number of bytes that could not be parsed correctly."]
18175    pub rx_parse_err: u16,
18176    #[doc = "Transmit buffer overflows. This number wraps around as it reaches UINT16_MAX"]
18177    pub tx_overflows: u16,
18178    #[doc = "Receive buffer overflows. This number wraps around as it reaches UINT16_MAX"]
18179    pub rx_overflows: u16,
18180    #[doc = "Remaining free transmit buffer space"]
18181    pub tx_buf: u8,
18182    #[doc = "Remaining free receive buffer space"]
18183    pub rx_buf: u8,
18184}
18185impl LINK_NODE_STATUS_DATA {
18186    pub const ENCODED_LEN: usize = 36usize;
18187    pub const DEFAULT: Self = Self {
18188        timestamp: 0_u64,
18189        tx_rate: 0_u32,
18190        rx_rate: 0_u32,
18191        messages_sent: 0_u32,
18192        messages_received: 0_u32,
18193        messages_lost: 0_u32,
18194        rx_parse_err: 0_u16,
18195        tx_overflows: 0_u16,
18196        rx_overflows: 0_u16,
18197        tx_buf: 0_u8,
18198        rx_buf: 0_u8,
18199    };
18200    #[cfg(feature = "arbitrary")]
18201    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18202        use arbitrary::{Arbitrary, Unstructured};
18203        let mut buf = [0u8; 1024];
18204        rng.fill_bytes(&mut buf);
18205        let mut unstructured = Unstructured::new(&buf);
18206        Self::arbitrary(&mut unstructured).unwrap_or_default()
18207    }
18208}
18209impl Default for LINK_NODE_STATUS_DATA {
18210    fn default() -> Self {
18211        Self::DEFAULT.clone()
18212    }
18213}
18214impl MessageData for LINK_NODE_STATUS_DATA {
18215    type Message = MavMessage;
18216    const ID: u32 = 8u32;
18217    const NAME: &'static str = "LINK_NODE_STATUS";
18218    const EXTRA_CRC: u8 = 117u8;
18219    const ENCODED_LEN: usize = 36usize;
18220    fn deser(
18221        _version: MavlinkVersion,
18222        __input: &[u8],
18223    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18224        let avail_len = __input.len();
18225        let mut payload_buf = [0; Self::ENCODED_LEN];
18226        let mut buf = if avail_len < Self::ENCODED_LEN {
18227            payload_buf[0..avail_len].copy_from_slice(__input);
18228            Bytes::new(&payload_buf)
18229        } else {
18230            Bytes::new(__input)
18231        };
18232        let mut __struct = Self::default();
18233        __struct.timestamp = buf.get_u64_le()?;
18234        __struct.tx_rate = buf.get_u32_le()?;
18235        __struct.rx_rate = buf.get_u32_le()?;
18236        __struct.messages_sent = buf.get_u32_le()?;
18237        __struct.messages_received = buf.get_u32_le()?;
18238        __struct.messages_lost = buf.get_u32_le()?;
18239        __struct.rx_parse_err = buf.get_u16_le()?;
18240        __struct.tx_overflows = buf.get_u16_le()?;
18241        __struct.rx_overflows = buf.get_u16_le()?;
18242        __struct.tx_buf = buf.get_u8()?;
18243        __struct.rx_buf = buf.get_u8()?;
18244        Ok(__struct)
18245    }
18246    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18247        let mut __tmp = BytesMut::new(bytes);
18248        #[allow(clippy::absurd_extreme_comparisons)]
18249        #[allow(unused_comparisons)]
18250        if __tmp.remaining() < Self::ENCODED_LEN {
18251            panic!(
18252                "buffer is too small (need {} bytes, but got {})",
18253                Self::ENCODED_LEN,
18254                __tmp.remaining(),
18255            )
18256        }
18257        __tmp.put_u64_le(self.timestamp);
18258        __tmp.put_u32_le(self.tx_rate);
18259        __tmp.put_u32_le(self.rx_rate);
18260        __tmp.put_u32_le(self.messages_sent);
18261        __tmp.put_u32_le(self.messages_received);
18262        __tmp.put_u32_le(self.messages_lost);
18263        __tmp.put_u16_le(self.rx_parse_err);
18264        __tmp.put_u16_le(self.tx_overflows);
18265        __tmp.put_u16_le(self.rx_overflows);
18266        __tmp.put_u8(self.tx_buf);
18267        __tmp.put_u8(self.rx_buf);
18268        if matches!(version, MavlinkVersion::V2) {
18269            let len = __tmp.len();
18270            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18271        } else {
18272            __tmp.len()
18273        }
18274    }
18275}
18276#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
18277#[doc = ""]
18278#[doc = "ID: 32"]
18279#[derive(Debug, Clone, PartialEq)]
18280#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18281#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18282#[cfg_attr(feature = "ts", derive(TS))]
18283#[cfg_attr(feature = "ts", ts(export))]
18284pub struct LOCAL_POSITION_NED_DATA {
18285    #[doc = "Timestamp (time since system boot)."]
18286    pub time_boot_ms: u32,
18287    #[doc = "X Position"]
18288    pub x: f32,
18289    #[doc = "Y Position"]
18290    pub y: f32,
18291    #[doc = "Z Position"]
18292    pub z: f32,
18293    #[doc = "X Speed"]
18294    pub vx: f32,
18295    #[doc = "Y Speed"]
18296    pub vy: f32,
18297    #[doc = "Z Speed"]
18298    pub vz: f32,
18299}
18300impl LOCAL_POSITION_NED_DATA {
18301    pub const ENCODED_LEN: usize = 28usize;
18302    pub const DEFAULT: Self = Self {
18303        time_boot_ms: 0_u32,
18304        x: 0.0_f32,
18305        y: 0.0_f32,
18306        z: 0.0_f32,
18307        vx: 0.0_f32,
18308        vy: 0.0_f32,
18309        vz: 0.0_f32,
18310    };
18311    #[cfg(feature = "arbitrary")]
18312    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18313        use arbitrary::{Arbitrary, Unstructured};
18314        let mut buf = [0u8; 1024];
18315        rng.fill_bytes(&mut buf);
18316        let mut unstructured = Unstructured::new(&buf);
18317        Self::arbitrary(&mut unstructured).unwrap_or_default()
18318    }
18319}
18320impl Default for LOCAL_POSITION_NED_DATA {
18321    fn default() -> Self {
18322        Self::DEFAULT.clone()
18323    }
18324}
18325impl MessageData for LOCAL_POSITION_NED_DATA {
18326    type Message = MavMessage;
18327    const ID: u32 = 32u32;
18328    const NAME: &'static str = "LOCAL_POSITION_NED";
18329    const EXTRA_CRC: u8 = 185u8;
18330    const ENCODED_LEN: usize = 28usize;
18331    fn deser(
18332        _version: MavlinkVersion,
18333        __input: &[u8],
18334    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18335        let avail_len = __input.len();
18336        let mut payload_buf = [0; Self::ENCODED_LEN];
18337        let mut buf = if avail_len < Self::ENCODED_LEN {
18338            payload_buf[0..avail_len].copy_from_slice(__input);
18339            Bytes::new(&payload_buf)
18340        } else {
18341            Bytes::new(__input)
18342        };
18343        let mut __struct = Self::default();
18344        __struct.time_boot_ms = buf.get_u32_le()?;
18345        __struct.x = buf.get_f32_le()?;
18346        __struct.y = buf.get_f32_le()?;
18347        __struct.z = buf.get_f32_le()?;
18348        __struct.vx = buf.get_f32_le()?;
18349        __struct.vy = buf.get_f32_le()?;
18350        __struct.vz = buf.get_f32_le()?;
18351        Ok(__struct)
18352    }
18353    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18354        let mut __tmp = BytesMut::new(bytes);
18355        #[allow(clippy::absurd_extreme_comparisons)]
18356        #[allow(unused_comparisons)]
18357        if __tmp.remaining() < Self::ENCODED_LEN {
18358            panic!(
18359                "buffer is too small (need {} bytes, but got {})",
18360                Self::ENCODED_LEN,
18361                __tmp.remaining(),
18362            )
18363        }
18364        __tmp.put_u32_le(self.time_boot_ms);
18365        __tmp.put_f32_le(self.x);
18366        __tmp.put_f32_le(self.y);
18367        __tmp.put_f32_le(self.z);
18368        __tmp.put_f32_le(self.vx);
18369        __tmp.put_f32_le(self.vy);
18370        __tmp.put_f32_le(self.vz);
18371        if matches!(version, MavlinkVersion::V2) {
18372            let len = __tmp.len();
18373            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18374        } else {
18375            __tmp.len()
18376        }
18377    }
18378}
18379#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
18380#[doc = ""]
18381#[doc = "ID: 64"]
18382#[derive(Debug, Clone, PartialEq)]
18383#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18384#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18385#[cfg_attr(feature = "ts", derive(TS))]
18386#[cfg_attr(feature = "ts", ts(export))]
18387pub struct LOCAL_POSITION_NED_COV_DATA {
18388    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
18389    pub time_usec: u64,
18390    #[doc = "X Position"]
18391    pub x: f32,
18392    #[doc = "Y Position"]
18393    pub y: f32,
18394    #[doc = "Z Position"]
18395    pub z: f32,
18396    #[doc = "X Speed"]
18397    pub vx: f32,
18398    #[doc = "Y Speed"]
18399    pub vy: f32,
18400    #[doc = "Z Speed"]
18401    pub vz: f32,
18402    #[doc = "X Acceleration"]
18403    pub ax: f32,
18404    #[doc = "Y Acceleration"]
18405    pub ay: f32,
18406    #[doc = "Z Acceleration"]
18407    pub az: f32,
18408    #[doc = "Row-major representation of position, velocity and acceleration 9x9 cross-covariance matrix upper right triangle (states: x, y, z, vx, vy, vz, ax, ay, az; first nine entries are the first ROW, next eight entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
18409    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18410    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18411    pub covariance: [f32; 45],
18412    #[doc = "Class id of the estimator this estimate originated from."]
18413    pub estimator_type: MavEstimatorType,
18414}
18415impl LOCAL_POSITION_NED_COV_DATA {
18416    pub const ENCODED_LEN: usize = 225usize;
18417    pub const DEFAULT: Self = Self {
18418        time_usec: 0_u64,
18419        x: 0.0_f32,
18420        y: 0.0_f32,
18421        z: 0.0_f32,
18422        vx: 0.0_f32,
18423        vy: 0.0_f32,
18424        vz: 0.0_f32,
18425        ax: 0.0_f32,
18426        ay: 0.0_f32,
18427        az: 0.0_f32,
18428        covariance: [0.0_f32; 45usize],
18429        estimator_type: MavEstimatorType::DEFAULT,
18430    };
18431    #[cfg(feature = "arbitrary")]
18432    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18433        use arbitrary::{Arbitrary, Unstructured};
18434        let mut buf = [0u8; 1024];
18435        rng.fill_bytes(&mut buf);
18436        let mut unstructured = Unstructured::new(&buf);
18437        Self::arbitrary(&mut unstructured).unwrap_or_default()
18438    }
18439}
18440impl Default for LOCAL_POSITION_NED_COV_DATA {
18441    fn default() -> Self {
18442        Self::DEFAULT.clone()
18443    }
18444}
18445impl MessageData for LOCAL_POSITION_NED_COV_DATA {
18446    type Message = MavMessage;
18447    const ID: u32 = 64u32;
18448    const NAME: &'static str = "LOCAL_POSITION_NED_COV";
18449    const EXTRA_CRC: u8 = 191u8;
18450    const ENCODED_LEN: usize = 225usize;
18451    fn deser(
18452        _version: MavlinkVersion,
18453        __input: &[u8],
18454    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18455        let avail_len = __input.len();
18456        let mut payload_buf = [0; Self::ENCODED_LEN];
18457        let mut buf = if avail_len < Self::ENCODED_LEN {
18458            payload_buf[0..avail_len].copy_from_slice(__input);
18459            Bytes::new(&payload_buf)
18460        } else {
18461            Bytes::new(__input)
18462        };
18463        let mut __struct = Self::default();
18464        __struct.time_usec = buf.get_u64_le()?;
18465        __struct.x = buf.get_f32_le()?;
18466        __struct.y = buf.get_f32_le()?;
18467        __struct.z = buf.get_f32_le()?;
18468        __struct.vx = buf.get_f32_le()?;
18469        __struct.vy = buf.get_f32_le()?;
18470        __struct.vz = buf.get_f32_le()?;
18471        __struct.ax = buf.get_f32_le()?;
18472        __struct.ay = buf.get_f32_le()?;
18473        __struct.az = buf.get_f32_le()?;
18474        for v in &mut __struct.covariance {
18475            let val = buf.get_f32_le()?;
18476            *v = val;
18477        }
18478        let tmp = buf.get_u8()?;
18479        __struct.estimator_type =
18480            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18481                enum_type: "MavEstimatorType",
18482                value: tmp as u64,
18483            })?;
18484        Ok(__struct)
18485    }
18486    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18487        let mut __tmp = BytesMut::new(bytes);
18488        #[allow(clippy::absurd_extreme_comparisons)]
18489        #[allow(unused_comparisons)]
18490        if __tmp.remaining() < Self::ENCODED_LEN {
18491            panic!(
18492                "buffer is too small (need {} bytes, but got {})",
18493                Self::ENCODED_LEN,
18494                __tmp.remaining(),
18495            )
18496        }
18497        __tmp.put_u64_le(self.time_usec);
18498        __tmp.put_f32_le(self.x);
18499        __tmp.put_f32_le(self.y);
18500        __tmp.put_f32_le(self.z);
18501        __tmp.put_f32_le(self.vx);
18502        __tmp.put_f32_le(self.vy);
18503        __tmp.put_f32_le(self.vz);
18504        __tmp.put_f32_le(self.ax);
18505        __tmp.put_f32_le(self.ay);
18506        __tmp.put_f32_le(self.az);
18507        for val in &self.covariance {
18508            __tmp.put_f32_le(*val);
18509        }
18510        __tmp.put_u8(self.estimator_type as u8);
18511        if matches!(version, MavlinkVersion::V2) {
18512            let len = __tmp.len();
18513            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18514        } else {
18515            __tmp.len()
18516        }
18517    }
18518}
18519#[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
18520#[doc = ""]
18521#[doc = "ID: 89"]
18522#[derive(Debug, Clone, PartialEq)]
18523#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18524#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18525#[cfg_attr(feature = "ts", derive(TS))]
18526#[cfg_attr(feature = "ts", ts(export))]
18527pub struct LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18528    #[doc = "Timestamp (time since system boot)."]
18529    pub time_boot_ms: u32,
18530    #[doc = "X Position"]
18531    pub x: f32,
18532    #[doc = "Y Position"]
18533    pub y: f32,
18534    #[doc = "Z Position"]
18535    pub z: f32,
18536    #[doc = "Roll"]
18537    pub roll: f32,
18538    #[doc = "Pitch"]
18539    pub pitch: f32,
18540    #[doc = "Yaw"]
18541    pub yaw: f32,
18542}
18543impl LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18544    pub const ENCODED_LEN: usize = 28usize;
18545    pub const DEFAULT: Self = Self {
18546        time_boot_ms: 0_u32,
18547        x: 0.0_f32,
18548        y: 0.0_f32,
18549        z: 0.0_f32,
18550        roll: 0.0_f32,
18551        pitch: 0.0_f32,
18552        yaw: 0.0_f32,
18553    };
18554    #[cfg(feature = "arbitrary")]
18555    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18556        use arbitrary::{Arbitrary, Unstructured};
18557        let mut buf = [0u8; 1024];
18558        rng.fill_bytes(&mut buf);
18559        let mut unstructured = Unstructured::new(&buf);
18560        Self::arbitrary(&mut unstructured).unwrap_or_default()
18561    }
18562}
18563impl Default for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18564    fn default() -> Self {
18565        Self::DEFAULT.clone()
18566    }
18567}
18568impl MessageData for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18569    type Message = MavMessage;
18570    const ID: u32 = 89u32;
18571    const NAME: &'static str = "LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET";
18572    const EXTRA_CRC: u8 = 231u8;
18573    const ENCODED_LEN: usize = 28usize;
18574    fn deser(
18575        _version: MavlinkVersion,
18576        __input: &[u8],
18577    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18578        let avail_len = __input.len();
18579        let mut payload_buf = [0; Self::ENCODED_LEN];
18580        let mut buf = if avail_len < Self::ENCODED_LEN {
18581            payload_buf[0..avail_len].copy_from_slice(__input);
18582            Bytes::new(&payload_buf)
18583        } else {
18584            Bytes::new(__input)
18585        };
18586        let mut __struct = Self::default();
18587        __struct.time_boot_ms = buf.get_u32_le()?;
18588        __struct.x = buf.get_f32_le()?;
18589        __struct.y = buf.get_f32_le()?;
18590        __struct.z = buf.get_f32_le()?;
18591        __struct.roll = buf.get_f32_le()?;
18592        __struct.pitch = buf.get_f32_le()?;
18593        __struct.yaw = buf.get_f32_le()?;
18594        Ok(__struct)
18595    }
18596    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18597        let mut __tmp = BytesMut::new(bytes);
18598        #[allow(clippy::absurd_extreme_comparisons)]
18599        #[allow(unused_comparisons)]
18600        if __tmp.remaining() < Self::ENCODED_LEN {
18601            panic!(
18602                "buffer is too small (need {} bytes, but got {})",
18603                Self::ENCODED_LEN,
18604                __tmp.remaining(),
18605            )
18606        }
18607        __tmp.put_u32_le(self.time_boot_ms);
18608        __tmp.put_f32_le(self.x);
18609        __tmp.put_f32_le(self.y);
18610        __tmp.put_f32_le(self.z);
18611        __tmp.put_f32_le(self.roll);
18612        __tmp.put_f32_le(self.pitch);
18613        __tmp.put_f32_le(self.yaw);
18614        if matches!(version, MavlinkVersion::V2) {
18615            let len = __tmp.len();
18616            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18617        } else {
18618            __tmp.len()
18619        }
18620    }
18621}
18622#[doc = "An ack for a LOGGING_DATA_ACKED message."]
18623#[doc = ""]
18624#[doc = "ID: 268"]
18625#[derive(Debug, Clone, PartialEq)]
18626#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18627#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18628#[cfg_attr(feature = "ts", derive(TS))]
18629#[cfg_attr(feature = "ts", ts(export))]
18630pub struct LOGGING_ACK_DATA {
18631    #[doc = "sequence number (must match the one in LOGGING_DATA_ACKED)"]
18632    pub sequence: u16,
18633    #[doc = "system ID of the target"]
18634    pub target_system: u8,
18635    #[doc = "component ID of the target"]
18636    pub target_component: u8,
18637}
18638impl LOGGING_ACK_DATA {
18639    pub const ENCODED_LEN: usize = 4usize;
18640    pub const DEFAULT: Self = Self {
18641        sequence: 0_u16,
18642        target_system: 0_u8,
18643        target_component: 0_u8,
18644    };
18645    #[cfg(feature = "arbitrary")]
18646    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18647        use arbitrary::{Arbitrary, Unstructured};
18648        let mut buf = [0u8; 1024];
18649        rng.fill_bytes(&mut buf);
18650        let mut unstructured = Unstructured::new(&buf);
18651        Self::arbitrary(&mut unstructured).unwrap_or_default()
18652    }
18653}
18654impl Default for LOGGING_ACK_DATA {
18655    fn default() -> Self {
18656        Self::DEFAULT.clone()
18657    }
18658}
18659impl MessageData for LOGGING_ACK_DATA {
18660    type Message = MavMessage;
18661    const ID: u32 = 268u32;
18662    const NAME: &'static str = "LOGGING_ACK";
18663    const EXTRA_CRC: u8 = 14u8;
18664    const ENCODED_LEN: usize = 4usize;
18665    fn deser(
18666        _version: MavlinkVersion,
18667        __input: &[u8],
18668    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18669        let avail_len = __input.len();
18670        let mut payload_buf = [0; Self::ENCODED_LEN];
18671        let mut buf = if avail_len < Self::ENCODED_LEN {
18672            payload_buf[0..avail_len].copy_from_slice(__input);
18673            Bytes::new(&payload_buf)
18674        } else {
18675            Bytes::new(__input)
18676        };
18677        let mut __struct = Self::default();
18678        __struct.sequence = buf.get_u16_le()?;
18679        __struct.target_system = buf.get_u8()?;
18680        __struct.target_component = buf.get_u8()?;
18681        Ok(__struct)
18682    }
18683    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18684        let mut __tmp = BytesMut::new(bytes);
18685        #[allow(clippy::absurd_extreme_comparisons)]
18686        #[allow(unused_comparisons)]
18687        if __tmp.remaining() < Self::ENCODED_LEN {
18688            panic!(
18689                "buffer is too small (need {} bytes, but got {})",
18690                Self::ENCODED_LEN,
18691                __tmp.remaining(),
18692            )
18693        }
18694        __tmp.put_u16_le(self.sequence);
18695        __tmp.put_u8(self.target_system);
18696        __tmp.put_u8(self.target_component);
18697        if matches!(version, MavlinkVersion::V2) {
18698            let len = __tmp.len();
18699            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18700        } else {
18701            __tmp.len()
18702        }
18703    }
18704}
18705#[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
18706#[doc = ""]
18707#[doc = "ID: 266"]
18708#[derive(Debug, Clone, PartialEq)]
18709#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18710#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18711#[cfg_attr(feature = "ts", derive(TS))]
18712#[cfg_attr(feature = "ts", ts(export))]
18713pub struct LOGGING_DATA_DATA {
18714    #[doc = "sequence number (can wrap)"]
18715    pub sequence: u16,
18716    #[doc = "system ID of the target"]
18717    pub target_system: u8,
18718    #[doc = "component ID of the target"]
18719    pub target_component: u8,
18720    #[doc = "data length"]
18721    pub length: u8,
18722    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
18723    pub first_message_offset: u8,
18724    #[doc = "logged data"]
18725    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18726    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18727    pub data: [u8; 249],
18728}
18729impl LOGGING_DATA_DATA {
18730    pub const ENCODED_LEN: usize = 255usize;
18731    pub const DEFAULT: Self = Self {
18732        sequence: 0_u16,
18733        target_system: 0_u8,
18734        target_component: 0_u8,
18735        length: 0_u8,
18736        first_message_offset: 0_u8,
18737        data: [0_u8; 249usize],
18738    };
18739    #[cfg(feature = "arbitrary")]
18740    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18741        use arbitrary::{Arbitrary, Unstructured};
18742        let mut buf = [0u8; 1024];
18743        rng.fill_bytes(&mut buf);
18744        let mut unstructured = Unstructured::new(&buf);
18745        Self::arbitrary(&mut unstructured).unwrap_or_default()
18746    }
18747}
18748impl Default for LOGGING_DATA_DATA {
18749    fn default() -> Self {
18750        Self::DEFAULT.clone()
18751    }
18752}
18753impl MessageData for LOGGING_DATA_DATA {
18754    type Message = MavMessage;
18755    const ID: u32 = 266u32;
18756    const NAME: &'static str = "LOGGING_DATA";
18757    const EXTRA_CRC: u8 = 193u8;
18758    const ENCODED_LEN: usize = 255usize;
18759    fn deser(
18760        _version: MavlinkVersion,
18761        __input: &[u8],
18762    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18763        let avail_len = __input.len();
18764        let mut payload_buf = [0; Self::ENCODED_LEN];
18765        let mut buf = if avail_len < Self::ENCODED_LEN {
18766            payload_buf[0..avail_len].copy_from_slice(__input);
18767            Bytes::new(&payload_buf)
18768        } else {
18769            Bytes::new(__input)
18770        };
18771        let mut __struct = Self::default();
18772        __struct.sequence = buf.get_u16_le()?;
18773        __struct.target_system = buf.get_u8()?;
18774        __struct.target_component = buf.get_u8()?;
18775        __struct.length = buf.get_u8()?;
18776        __struct.first_message_offset = buf.get_u8()?;
18777        for v in &mut __struct.data {
18778            let val = buf.get_u8()?;
18779            *v = val;
18780        }
18781        Ok(__struct)
18782    }
18783    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18784        let mut __tmp = BytesMut::new(bytes);
18785        #[allow(clippy::absurd_extreme_comparisons)]
18786        #[allow(unused_comparisons)]
18787        if __tmp.remaining() < Self::ENCODED_LEN {
18788            panic!(
18789                "buffer is too small (need {} bytes, but got {})",
18790                Self::ENCODED_LEN,
18791                __tmp.remaining(),
18792            )
18793        }
18794        __tmp.put_u16_le(self.sequence);
18795        __tmp.put_u8(self.target_system);
18796        __tmp.put_u8(self.target_component);
18797        __tmp.put_u8(self.length);
18798        __tmp.put_u8(self.first_message_offset);
18799        for val in &self.data {
18800            __tmp.put_u8(*val);
18801        }
18802        if matches!(version, MavlinkVersion::V2) {
18803            let len = __tmp.len();
18804            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18805        } else {
18806            __tmp.len()
18807        }
18808    }
18809}
18810#[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
18811#[doc = ""]
18812#[doc = "ID: 267"]
18813#[derive(Debug, Clone, PartialEq)]
18814#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18815#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18816#[cfg_attr(feature = "ts", derive(TS))]
18817#[cfg_attr(feature = "ts", ts(export))]
18818pub struct LOGGING_DATA_ACKED_DATA {
18819    #[doc = "sequence number (can wrap)"]
18820    pub sequence: u16,
18821    #[doc = "system ID of the target"]
18822    pub target_system: u8,
18823    #[doc = "component ID of the target"]
18824    pub target_component: u8,
18825    #[doc = "data length"]
18826    pub length: u8,
18827    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
18828    pub first_message_offset: u8,
18829    #[doc = "logged data"]
18830    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18831    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18832    pub data: [u8; 249],
18833}
18834impl LOGGING_DATA_ACKED_DATA {
18835    pub const ENCODED_LEN: usize = 255usize;
18836    pub const DEFAULT: Self = Self {
18837        sequence: 0_u16,
18838        target_system: 0_u8,
18839        target_component: 0_u8,
18840        length: 0_u8,
18841        first_message_offset: 0_u8,
18842        data: [0_u8; 249usize],
18843    };
18844    #[cfg(feature = "arbitrary")]
18845    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18846        use arbitrary::{Arbitrary, Unstructured};
18847        let mut buf = [0u8; 1024];
18848        rng.fill_bytes(&mut buf);
18849        let mut unstructured = Unstructured::new(&buf);
18850        Self::arbitrary(&mut unstructured).unwrap_or_default()
18851    }
18852}
18853impl Default for LOGGING_DATA_ACKED_DATA {
18854    fn default() -> Self {
18855        Self::DEFAULT.clone()
18856    }
18857}
18858impl MessageData for LOGGING_DATA_ACKED_DATA {
18859    type Message = MavMessage;
18860    const ID: u32 = 267u32;
18861    const NAME: &'static str = "LOGGING_DATA_ACKED";
18862    const EXTRA_CRC: u8 = 35u8;
18863    const ENCODED_LEN: usize = 255usize;
18864    fn deser(
18865        _version: MavlinkVersion,
18866        __input: &[u8],
18867    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18868        let avail_len = __input.len();
18869        let mut payload_buf = [0; Self::ENCODED_LEN];
18870        let mut buf = if avail_len < Self::ENCODED_LEN {
18871            payload_buf[0..avail_len].copy_from_slice(__input);
18872            Bytes::new(&payload_buf)
18873        } else {
18874            Bytes::new(__input)
18875        };
18876        let mut __struct = Self::default();
18877        __struct.sequence = buf.get_u16_le()?;
18878        __struct.target_system = buf.get_u8()?;
18879        __struct.target_component = buf.get_u8()?;
18880        __struct.length = buf.get_u8()?;
18881        __struct.first_message_offset = buf.get_u8()?;
18882        for v in &mut __struct.data {
18883            let val = buf.get_u8()?;
18884            *v = val;
18885        }
18886        Ok(__struct)
18887    }
18888    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18889        let mut __tmp = BytesMut::new(bytes);
18890        #[allow(clippy::absurd_extreme_comparisons)]
18891        #[allow(unused_comparisons)]
18892        if __tmp.remaining() < Self::ENCODED_LEN {
18893            panic!(
18894                "buffer is too small (need {} bytes, but got {})",
18895                Self::ENCODED_LEN,
18896                __tmp.remaining(),
18897            )
18898        }
18899        __tmp.put_u16_le(self.sequence);
18900        __tmp.put_u8(self.target_system);
18901        __tmp.put_u8(self.target_component);
18902        __tmp.put_u8(self.length);
18903        __tmp.put_u8(self.first_message_offset);
18904        for val in &self.data {
18905            __tmp.put_u8(*val);
18906        }
18907        if matches!(version, MavlinkVersion::V2) {
18908            let len = __tmp.len();
18909            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18910        } else {
18911            __tmp.len()
18912        }
18913    }
18914}
18915#[doc = "Reply to LOG_REQUEST_DATA."]
18916#[doc = ""]
18917#[doc = "ID: 120"]
18918#[derive(Debug, Clone, PartialEq)]
18919#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18920#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18921#[cfg_attr(feature = "ts", derive(TS))]
18922#[cfg_attr(feature = "ts", ts(export))]
18923pub struct LOG_DATA_DATA {
18924    #[doc = "Offset into the log"]
18925    pub ofs: u32,
18926    #[doc = "Log id (from LOG_ENTRY reply)"]
18927    pub id: u16,
18928    #[doc = "Number of bytes (zero for end of log)"]
18929    pub count: u8,
18930    #[doc = "log data"]
18931    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18932    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
18933    pub data: [u8; 90],
18934}
18935impl LOG_DATA_DATA {
18936    pub const ENCODED_LEN: usize = 97usize;
18937    pub const DEFAULT: Self = Self {
18938        ofs: 0_u32,
18939        id: 0_u16,
18940        count: 0_u8,
18941        data: [0_u8; 90usize],
18942    };
18943    #[cfg(feature = "arbitrary")]
18944    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18945        use arbitrary::{Arbitrary, Unstructured};
18946        let mut buf = [0u8; 1024];
18947        rng.fill_bytes(&mut buf);
18948        let mut unstructured = Unstructured::new(&buf);
18949        Self::arbitrary(&mut unstructured).unwrap_or_default()
18950    }
18951}
18952impl Default for LOG_DATA_DATA {
18953    fn default() -> Self {
18954        Self::DEFAULT.clone()
18955    }
18956}
18957impl MessageData for LOG_DATA_DATA {
18958    type Message = MavMessage;
18959    const ID: u32 = 120u32;
18960    const NAME: &'static str = "LOG_DATA";
18961    const EXTRA_CRC: u8 = 134u8;
18962    const ENCODED_LEN: usize = 97usize;
18963    fn deser(
18964        _version: MavlinkVersion,
18965        __input: &[u8],
18966    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18967        let avail_len = __input.len();
18968        let mut payload_buf = [0; Self::ENCODED_LEN];
18969        let mut buf = if avail_len < Self::ENCODED_LEN {
18970            payload_buf[0..avail_len].copy_from_slice(__input);
18971            Bytes::new(&payload_buf)
18972        } else {
18973            Bytes::new(__input)
18974        };
18975        let mut __struct = Self::default();
18976        __struct.ofs = buf.get_u32_le()?;
18977        __struct.id = buf.get_u16_le()?;
18978        __struct.count = buf.get_u8()?;
18979        for v in &mut __struct.data {
18980            let val = buf.get_u8()?;
18981            *v = val;
18982        }
18983        Ok(__struct)
18984    }
18985    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18986        let mut __tmp = BytesMut::new(bytes);
18987        #[allow(clippy::absurd_extreme_comparisons)]
18988        #[allow(unused_comparisons)]
18989        if __tmp.remaining() < Self::ENCODED_LEN {
18990            panic!(
18991                "buffer is too small (need {} bytes, but got {})",
18992                Self::ENCODED_LEN,
18993                __tmp.remaining(),
18994            )
18995        }
18996        __tmp.put_u32_le(self.ofs);
18997        __tmp.put_u16_le(self.id);
18998        __tmp.put_u8(self.count);
18999        for val in &self.data {
19000            __tmp.put_u8(*val);
19001        }
19002        if matches!(version, MavlinkVersion::V2) {
19003            let len = __tmp.len();
19004            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19005        } else {
19006            __tmp.len()
19007        }
19008    }
19009}
19010#[doc = "Reply to LOG_REQUEST_LIST."]
19011#[doc = ""]
19012#[doc = "ID: 118"]
19013#[derive(Debug, Clone, PartialEq)]
19014#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19015#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19016#[cfg_attr(feature = "ts", derive(TS))]
19017#[cfg_attr(feature = "ts", ts(export))]
19018pub struct LOG_ENTRY_DATA {
19019    #[doc = "UTC timestamp of log since 1970, or 0 if not available"]
19020    pub time_utc: u32,
19021    #[doc = "Size of the log (may be approximate)"]
19022    pub size: u32,
19023    #[doc = "Log id"]
19024    pub id: u16,
19025    #[doc = "Total number of logs"]
19026    pub num_logs: u16,
19027    #[doc = "High log number"]
19028    pub last_log_num: u16,
19029}
19030impl LOG_ENTRY_DATA {
19031    pub const ENCODED_LEN: usize = 14usize;
19032    pub const DEFAULT: Self = Self {
19033        time_utc: 0_u32,
19034        size: 0_u32,
19035        id: 0_u16,
19036        num_logs: 0_u16,
19037        last_log_num: 0_u16,
19038    };
19039    #[cfg(feature = "arbitrary")]
19040    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19041        use arbitrary::{Arbitrary, Unstructured};
19042        let mut buf = [0u8; 1024];
19043        rng.fill_bytes(&mut buf);
19044        let mut unstructured = Unstructured::new(&buf);
19045        Self::arbitrary(&mut unstructured).unwrap_or_default()
19046    }
19047}
19048impl Default for LOG_ENTRY_DATA {
19049    fn default() -> Self {
19050        Self::DEFAULT.clone()
19051    }
19052}
19053impl MessageData for LOG_ENTRY_DATA {
19054    type Message = MavMessage;
19055    const ID: u32 = 118u32;
19056    const NAME: &'static str = "LOG_ENTRY";
19057    const EXTRA_CRC: u8 = 56u8;
19058    const ENCODED_LEN: usize = 14usize;
19059    fn deser(
19060        _version: MavlinkVersion,
19061        __input: &[u8],
19062    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19063        let avail_len = __input.len();
19064        let mut payload_buf = [0; Self::ENCODED_LEN];
19065        let mut buf = if avail_len < Self::ENCODED_LEN {
19066            payload_buf[0..avail_len].copy_from_slice(__input);
19067            Bytes::new(&payload_buf)
19068        } else {
19069            Bytes::new(__input)
19070        };
19071        let mut __struct = Self::default();
19072        __struct.time_utc = buf.get_u32_le()?;
19073        __struct.size = buf.get_u32_le()?;
19074        __struct.id = buf.get_u16_le()?;
19075        __struct.num_logs = buf.get_u16_le()?;
19076        __struct.last_log_num = buf.get_u16_le()?;
19077        Ok(__struct)
19078    }
19079    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19080        let mut __tmp = BytesMut::new(bytes);
19081        #[allow(clippy::absurd_extreme_comparisons)]
19082        #[allow(unused_comparisons)]
19083        if __tmp.remaining() < Self::ENCODED_LEN {
19084            panic!(
19085                "buffer is too small (need {} bytes, but got {})",
19086                Self::ENCODED_LEN,
19087                __tmp.remaining(),
19088            )
19089        }
19090        __tmp.put_u32_le(self.time_utc);
19091        __tmp.put_u32_le(self.size);
19092        __tmp.put_u16_le(self.id);
19093        __tmp.put_u16_le(self.num_logs);
19094        __tmp.put_u16_le(self.last_log_num);
19095        if matches!(version, MavlinkVersion::V2) {
19096            let len = __tmp.len();
19097            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19098        } else {
19099            __tmp.len()
19100        }
19101    }
19102}
19103#[doc = "Erase all logs."]
19104#[doc = ""]
19105#[doc = "ID: 121"]
19106#[derive(Debug, Clone, PartialEq)]
19107#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19108#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19109#[cfg_attr(feature = "ts", derive(TS))]
19110#[cfg_attr(feature = "ts", ts(export))]
19111pub struct LOG_ERASE_DATA {
19112    #[doc = "System ID"]
19113    pub target_system: u8,
19114    #[doc = "Component ID"]
19115    pub target_component: u8,
19116}
19117impl LOG_ERASE_DATA {
19118    pub const ENCODED_LEN: usize = 2usize;
19119    pub const DEFAULT: Self = Self {
19120        target_system: 0_u8,
19121        target_component: 0_u8,
19122    };
19123    #[cfg(feature = "arbitrary")]
19124    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19125        use arbitrary::{Arbitrary, Unstructured};
19126        let mut buf = [0u8; 1024];
19127        rng.fill_bytes(&mut buf);
19128        let mut unstructured = Unstructured::new(&buf);
19129        Self::arbitrary(&mut unstructured).unwrap_or_default()
19130    }
19131}
19132impl Default for LOG_ERASE_DATA {
19133    fn default() -> Self {
19134        Self::DEFAULT.clone()
19135    }
19136}
19137impl MessageData for LOG_ERASE_DATA {
19138    type Message = MavMessage;
19139    const ID: u32 = 121u32;
19140    const NAME: &'static str = "LOG_ERASE";
19141    const EXTRA_CRC: u8 = 237u8;
19142    const ENCODED_LEN: usize = 2usize;
19143    fn deser(
19144        _version: MavlinkVersion,
19145        __input: &[u8],
19146    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19147        let avail_len = __input.len();
19148        let mut payload_buf = [0; Self::ENCODED_LEN];
19149        let mut buf = if avail_len < Self::ENCODED_LEN {
19150            payload_buf[0..avail_len].copy_from_slice(__input);
19151            Bytes::new(&payload_buf)
19152        } else {
19153            Bytes::new(__input)
19154        };
19155        let mut __struct = Self::default();
19156        __struct.target_system = buf.get_u8()?;
19157        __struct.target_component = buf.get_u8()?;
19158        Ok(__struct)
19159    }
19160    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19161        let mut __tmp = BytesMut::new(bytes);
19162        #[allow(clippy::absurd_extreme_comparisons)]
19163        #[allow(unused_comparisons)]
19164        if __tmp.remaining() < Self::ENCODED_LEN {
19165            panic!(
19166                "buffer is too small (need {} bytes, but got {})",
19167                Self::ENCODED_LEN,
19168                __tmp.remaining(),
19169            )
19170        }
19171        __tmp.put_u8(self.target_system);
19172        __tmp.put_u8(self.target_component);
19173        if matches!(version, MavlinkVersion::V2) {
19174            let len = __tmp.len();
19175            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19176        } else {
19177            __tmp.len()
19178        }
19179    }
19180}
19181#[doc = "Request a chunk of a log."]
19182#[doc = ""]
19183#[doc = "ID: 119"]
19184#[derive(Debug, Clone, PartialEq)]
19185#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19186#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19187#[cfg_attr(feature = "ts", derive(TS))]
19188#[cfg_attr(feature = "ts", ts(export))]
19189pub struct LOG_REQUEST_DATA_DATA {
19190    #[doc = "Offset into the log"]
19191    pub ofs: u32,
19192    #[doc = "Number of bytes"]
19193    pub count: u32,
19194    #[doc = "Log id (from LOG_ENTRY reply)"]
19195    pub id: u16,
19196    #[doc = "System ID"]
19197    pub target_system: u8,
19198    #[doc = "Component ID"]
19199    pub target_component: u8,
19200}
19201impl LOG_REQUEST_DATA_DATA {
19202    pub const ENCODED_LEN: usize = 12usize;
19203    pub const DEFAULT: Self = Self {
19204        ofs: 0_u32,
19205        count: 0_u32,
19206        id: 0_u16,
19207        target_system: 0_u8,
19208        target_component: 0_u8,
19209    };
19210    #[cfg(feature = "arbitrary")]
19211    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19212        use arbitrary::{Arbitrary, Unstructured};
19213        let mut buf = [0u8; 1024];
19214        rng.fill_bytes(&mut buf);
19215        let mut unstructured = Unstructured::new(&buf);
19216        Self::arbitrary(&mut unstructured).unwrap_or_default()
19217    }
19218}
19219impl Default for LOG_REQUEST_DATA_DATA {
19220    fn default() -> Self {
19221        Self::DEFAULT.clone()
19222    }
19223}
19224impl MessageData for LOG_REQUEST_DATA_DATA {
19225    type Message = MavMessage;
19226    const ID: u32 = 119u32;
19227    const NAME: &'static str = "LOG_REQUEST_DATA";
19228    const EXTRA_CRC: u8 = 116u8;
19229    const ENCODED_LEN: usize = 12usize;
19230    fn deser(
19231        _version: MavlinkVersion,
19232        __input: &[u8],
19233    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19234        let avail_len = __input.len();
19235        let mut payload_buf = [0; Self::ENCODED_LEN];
19236        let mut buf = if avail_len < Self::ENCODED_LEN {
19237            payload_buf[0..avail_len].copy_from_slice(__input);
19238            Bytes::new(&payload_buf)
19239        } else {
19240            Bytes::new(__input)
19241        };
19242        let mut __struct = Self::default();
19243        __struct.ofs = buf.get_u32_le()?;
19244        __struct.count = buf.get_u32_le()?;
19245        __struct.id = buf.get_u16_le()?;
19246        __struct.target_system = buf.get_u8()?;
19247        __struct.target_component = buf.get_u8()?;
19248        Ok(__struct)
19249    }
19250    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19251        let mut __tmp = BytesMut::new(bytes);
19252        #[allow(clippy::absurd_extreme_comparisons)]
19253        #[allow(unused_comparisons)]
19254        if __tmp.remaining() < Self::ENCODED_LEN {
19255            panic!(
19256                "buffer is too small (need {} bytes, but got {})",
19257                Self::ENCODED_LEN,
19258                __tmp.remaining(),
19259            )
19260        }
19261        __tmp.put_u32_le(self.ofs);
19262        __tmp.put_u32_le(self.count);
19263        __tmp.put_u16_le(self.id);
19264        __tmp.put_u8(self.target_system);
19265        __tmp.put_u8(self.target_component);
19266        if matches!(version, MavlinkVersion::V2) {
19267            let len = __tmp.len();
19268            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19269        } else {
19270            __tmp.len()
19271        }
19272    }
19273}
19274#[doc = "Stop log transfer and resume normal logging."]
19275#[doc = ""]
19276#[doc = "ID: 122"]
19277#[derive(Debug, Clone, PartialEq)]
19278#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19279#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19280#[cfg_attr(feature = "ts", derive(TS))]
19281#[cfg_attr(feature = "ts", ts(export))]
19282pub struct LOG_REQUEST_END_DATA {
19283    #[doc = "System ID"]
19284    pub target_system: u8,
19285    #[doc = "Component ID"]
19286    pub target_component: u8,
19287}
19288impl LOG_REQUEST_END_DATA {
19289    pub const ENCODED_LEN: usize = 2usize;
19290    pub const DEFAULT: Self = Self {
19291        target_system: 0_u8,
19292        target_component: 0_u8,
19293    };
19294    #[cfg(feature = "arbitrary")]
19295    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19296        use arbitrary::{Arbitrary, Unstructured};
19297        let mut buf = [0u8; 1024];
19298        rng.fill_bytes(&mut buf);
19299        let mut unstructured = Unstructured::new(&buf);
19300        Self::arbitrary(&mut unstructured).unwrap_or_default()
19301    }
19302}
19303impl Default for LOG_REQUEST_END_DATA {
19304    fn default() -> Self {
19305        Self::DEFAULT.clone()
19306    }
19307}
19308impl MessageData for LOG_REQUEST_END_DATA {
19309    type Message = MavMessage;
19310    const ID: u32 = 122u32;
19311    const NAME: &'static str = "LOG_REQUEST_END";
19312    const EXTRA_CRC: u8 = 203u8;
19313    const ENCODED_LEN: usize = 2usize;
19314    fn deser(
19315        _version: MavlinkVersion,
19316        __input: &[u8],
19317    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19318        let avail_len = __input.len();
19319        let mut payload_buf = [0; Self::ENCODED_LEN];
19320        let mut buf = if avail_len < Self::ENCODED_LEN {
19321            payload_buf[0..avail_len].copy_from_slice(__input);
19322            Bytes::new(&payload_buf)
19323        } else {
19324            Bytes::new(__input)
19325        };
19326        let mut __struct = Self::default();
19327        __struct.target_system = buf.get_u8()?;
19328        __struct.target_component = buf.get_u8()?;
19329        Ok(__struct)
19330    }
19331    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19332        let mut __tmp = BytesMut::new(bytes);
19333        #[allow(clippy::absurd_extreme_comparisons)]
19334        #[allow(unused_comparisons)]
19335        if __tmp.remaining() < Self::ENCODED_LEN {
19336            panic!(
19337                "buffer is too small (need {} bytes, but got {})",
19338                Self::ENCODED_LEN,
19339                __tmp.remaining(),
19340            )
19341        }
19342        __tmp.put_u8(self.target_system);
19343        __tmp.put_u8(self.target_component);
19344        if matches!(version, MavlinkVersion::V2) {
19345            let len = __tmp.len();
19346            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19347        } else {
19348            __tmp.len()
19349        }
19350    }
19351}
19352#[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
19353#[doc = ""]
19354#[doc = "ID: 117"]
19355#[derive(Debug, Clone, PartialEq)]
19356#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19357#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19358#[cfg_attr(feature = "ts", derive(TS))]
19359#[cfg_attr(feature = "ts", ts(export))]
19360pub struct LOG_REQUEST_LIST_DATA {
19361    #[doc = "First log id (0 for first available)"]
19362    pub start: u16,
19363    #[doc = "Last log id (0xffff for last available)"]
19364    pub end: u16,
19365    #[doc = "System ID"]
19366    pub target_system: u8,
19367    #[doc = "Component ID"]
19368    pub target_component: u8,
19369}
19370impl LOG_REQUEST_LIST_DATA {
19371    pub const ENCODED_LEN: usize = 6usize;
19372    pub const DEFAULT: Self = Self {
19373        start: 0_u16,
19374        end: 0_u16,
19375        target_system: 0_u8,
19376        target_component: 0_u8,
19377    };
19378    #[cfg(feature = "arbitrary")]
19379    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19380        use arbitrary::{Arbitrary, Unstructured};
19381        let mut buf = [0u8; 1024];
19382        rng.fill_bytes(&mut buf);
19383        let mut unstructured = Unstructured::new(&buf);
19384        Self::arbitrary(&mut unstructured).unwrap_or_default()
19385    }
19386}
19387impl Default for LOG_REQUEST_LIST_DATA {
19388    fn default() -> Self {
19389        Self::DEFAULT.clone()
19390    }
19391}
19392impl MessageData for LOG_REQUEST_LIST_DATA {
19393    type Message = MavMessage;
19394    const ID: u32 = 117u32;
19395    const NAME: &'static str = "LOG_REQUEST_LIST";
19396    const EXTRA_CRC: u8 = 128u8;
19397    const ENCODED_LEN: usize = 6usize;
19398    fn deser(
19399        _version: MavlinkVersion,
19400        __input: &[u8],
19401    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19402        let avail_len = __input.len();
19403        let mut payload_buf = [0; Self::ENCODED_LEN];
19404        let mut buf = if avail_len < Self::ENCODED_LEN {
19405            payload_buf[0..avail_len].copy_from_slice(__input);
19406            Bytes::new(&payload_buf)
19407        } else {
19408            Bytes::new(__input)
19409        };
19410        let mut __struct = Self::default();
19411        __struct.start = buf.get_u16_le()?;
19412        __struct.end = buf.get_u16_le()?;
19413        __struct.target_system = buf.get_u8()?;
19414        __struct.target_component = buf.get_u8()?;
19415        Ok(__struct)
19416    }
19417    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19418        let mut __tmp = BytesMut::new(bytes);
19419        #[allow(clippy::absurd_extreme_comparisons)]
19420        #[allow(unused_comparisons)]
19421        if __tmp.remaining() < Self::ENCODED_LEN {
19422            panic!(
19423                "buffer is too small (need {} bytes, but got {})",
19424                Self::ENCODED_LEN,
19425                __tmp.remaining(),
19426            )
19427        }
19428        __tmp.put_u16_le(self.start);
19429        __tmp.put_u16_le(self.end);
19430        __tmp.put_u8(self.target_system);
19431        __tmp.put_u8(self.target_component);
19432        if matches!(version, MavlinkVersion::V2) {
19433            let len = __tmp.len();
19434            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19435        } else {
19436            __tmp.len()
19437        }
19438    }
19439}
19440#[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
19441#[doc = ""]
19442#[doc = "ID: 192"]
19443#[derive(Debug, Clone, PartialEq)]
19444#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19445#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19446#[cfg_attr(feature = "ts", derive(TS))]
19447#[cfg_attr(feature = "ts", ts(export))]
19448pub struct MAG_CAL_REPORT_DATA {
19449    #[doc = "RMS milligauss residuals."]
19450    pub fitness: f32,
19451    #[doc = "X offset."]
19452    pub ofs_x: f32,
19453    #[doc = "Y offset."]
19454    pub ofs_y: f32,
19455    #[doc = "Z offset."]
19456    pub ofs_z: f32,
19457    #[doc = "X diagonal (matrix 11)."]
19458    pub diag_x: f32,
19459    #[doc = "Y diagonal (matrix 22)."]
19460    pub diag_y: f32,
19461    #[doc = "Z diagonal (matrix 33)."]
19462    pub diag_z: f32,
19463    #[doc = "X off-diagonal (matrix 12 and 21)."]
19464    pub offdiag_x: f32,
19465    #[doc = "Y off-diagonal (matrix 13 and 31)."]
19466    pub offdiag_y: f32,
19467    #[doc = "Z off-diagonal (matrix 32 and 23)."]
19468    pub offdiag_z: f32,
19469    #[doc = "Compass being calibrated."]
19470    pub compass_id: u8,
19471    #[doc = "Bitmask of compasses being calibrated."]
19472    pub cal_mask: u8,
19473    #[doc = "Calibration Status."]
19474    pub cal_status: MagCalStatus,
19475    #[doc = "0=requires a MAV_CMD_DO_ACCEPT_MAG_CAL, 1=saved to parameters."]
19476    pub autosaved: u8,
19477    #[doc = "Confidence in orientation (higher is better)."]
19478    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19479    pub orientation_confidence: f32,
19480    #[doc = "orientation before calibration."]
19481    #[cfg_attr(feature = "serde", serde(default))]
19482    pub old_orientation: MavSensorOrientation,
19483    #[doc = "orientation after calibration."]
19484    #[cfg_attr(feature = "serde", serde(default))]
19485    pub new_orientation: MavSensorOrientation,
19486    #[doc = "field radius correction factor"]
19487    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19488    pub scale_factor: f32,
19489}
19490impl MAG_CAL_REPORT_DATA {
19491    pub const ENCODED_LEN: usize = 54usize;
19492    pub const DEFAULT: Self = Self {
19493        fitness: 0.0_f32,
19494        ofs_x: 0.0_f32,
19495        ofs_y: 0.0_f32,
19496        ofs_z: 0.0_f32,
19497        diag_x: 0.0_f32,
19498        diag_y: 0.0_f32,
19499        diag_z: 0.0_f32,
19500        offdiag_x: 0.0_f32,
19501        offdiag_y: 0.0_f32,
19502        offdiag_z: 0.0_f32,
19503        compass_id: 0_u8,
19504        cal_mask: 0_u8,
19505        cal_status: MagCalStatus::DEFAULT,
19506        autosaved: 0_u8,
19507        orientation_confidence: 0.0_f32,
19508        old_orientation: MavSensorOrientation::DEFAULT,
19509        new_orientation: MavSensorOrientation::DEFAULT,
19510        scale_factor: 0.0_f32,
19511    };
19512    #[cfg(feature = "arbitrary")]
19513    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19514        use arbitrary::{Arbitrary, Unstructured};
19515        let mut buf = [0u8; 1024];
19516        rng.fill_bytes(&mut buf);
19517        let mut unstructured = Unstructured::new(&buf);
19518        Self::arbitrary(&mut unstructured).unwrap_or_default()
19519    }
19520}
19521impl Default for MAG_CAL_REPORT_DATA {
19522    fn default() -> Self {
19523        Self::DEFAULT.clone()
19524    }
19525}
19526impl MessageData for MAG_CAL_REPORT_DATA {
19527    type Message = MavMessage;
19528    const ID: u32 = 192u32;
19529    const NAME: &'static str = "MAG_CAL_REPORT";
19530    const EXTRA_CRC: u8 = 36u8;
19531    const ENCODED_LEN: usize = 54usize;
19532    fn deser(
19533        _version: MavlinkVersion,
19534        __input: &[u8],
19535    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19536        let avail_len = __input.len();
19537        let mut payload_buf = [0; Self::ENCODED_LEN];
19538        let mut buf = if avail_len < Self::ENCODED_LEN {
19539            payload_buf[0..avail_len].copy_from_slice(__input);
19540            Bytes::new(&payload_buf)
19541        } else {
19542            Bytes::new(__input)
19543        };
19544        let mut __struct = Self::default();
19545        __struct.fitness = buf.get_f32_le()?;
19546        __struct.ofs_x = buf.get_f32_le()?;
19547        __struct.ofs_y = buf.get_f32_le()?;
19548        __struct.ofs_z = buf.get_f32_le()?;
19549        __struct.diag_x = buf.get_f32_le()?;
19550        __struct.diag_y = buf.get_f32_le()?;
19551        __struct.diag_z = buf.get_f32_le()?;
19552        __struct.offdiag_x = buf.get_f32_le()?;
19553        __struct.offdiag_y = buf.get_f32_le()?;
19554        __struct.offdiag_z = buf.get_f32_le()?;
19555        __struct.compass_id = buf.get_u8()?;
19556        __struct.cal_mask = buf.get_u8()?;
19557        let tmp = buf.get_u8()?;
19558        __struct.cal_status =
19559            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19560                enum_type: "MagCalStatus",
19561                value: tmp as u64,
19562            })?;
19563        __struct.autosaved = buf.get_u8()?;
19564        __struct.orientation_confidence = buf.get_f32_le()?;
19565        let tmp = buf.get_u8()?;
19566        __struct.old_orientation =
19567            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19568                enum_type: "MavSensorOrientation",
19569                value: tmp as u64,
19570            })?;
19571        let tmp = buf.get_u8()?;
19572        __struct.new_orientation =
19573            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19574                enum_type: "MavSensorOrientation",
19575                value: tmp as u64,
19576            })?;
19577        __struct.scale_factor = buf.get_f32_le()?;
19578        Ok(__struct)
19579    }
19580    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19581        let mut __tmp = BytesMut::new(bytes);
19582        #[allow(clippy::absurd_extreme_comparisons)]
19583        #[allow(unused_comparisons)]
19584        if __tmp.remaining() < Self::ENCODED_LEN {
19585            panic!(
19586                "buffer is too small (need {} bytes, but got {})",
19587                Self::ENCODED_LEN,
19588                __tmp.remaining(),
19589            )
19590        }
19591        __tmp.put_f32_le(self.fitness);
19592        __tmp.put_f32_le(self.ofs_x);
19593        __tmp.put_f32_le(self.ofs_y);
19594        __tmp.put_f32_le(self.ofs_z);
19595        __tmp.put_f32_le(self.diag_x);
19596        __tmp.put_f32_le(self.diag_y);
19597        __tmp.put_f32_le(self.diag_z);
19598        __tmp.put_f32_le(self.offdiag_x);
19599        __tmp.put_f32_le(self.offdiag_y);
19600        __tmp.put_f32_le(self.offdiag_z);
19601        __tmp.put_u8(self.compass_id);
19602        __tmp.put_u8(self.cal_mask);
19603        __tmp.put_u8(self.cal_status as u8);
19604        __tmp.put_u8(self.autosaved);
19605        if matches!(version, MavlinkVersion::V2) {
19606            __tmp.put_f32_le(self.orientation_confidence);
19607            __tmp.put_u8(self.old_orientation as u8);
19608            __tmp.put_u8(self.new_orientation as u8);
19609            __tmp.put_f32_le(self.scale_factor);
19610            let len = __tmp.len();
19611            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19612        } else {
19613            __tmp.len()
19614        }
19615    }
19616}
19617#[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
19618#[doc = ""]
19619#[doc = "ID: 69"]
19620#[derive(Debug, Clone, PartialEq)]
19621#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19622#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19623#[cfg_attr(feature = "ts", derive(TS))]
19624#[cfg_attr(feature = "ts", ts(export))]
19625pub struct MANUAL_CONTROL_DATA {
19626    #[doc = "X-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to forward(1000)-backward(-1000) movement on a joystick and the pitch of a vehicle."]
19627    pub x: i16,
19628    #[doc = "Y-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to left(-1000)-right(1000) movement on a joystick and the roll of a vehicle."]
19629    pub y: i16,
19630    #[doc = "Z-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a separate slider movement with maximum being 1000 and minimum being -1000 on a joystick and the thrust of a vehicle. Positive values are positive thrust, negative values are negative thrust."]
19631    pub z: i16,
19632    #[doc = "R-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a twisting of the joystick, with counter-clockwise being 1000 and clockwise being -1000, and the yaw of a vehicle."]
19633    pub r: i16,
19634    #[doc = "A bitfield corresponding to the joystick buttons' 0-15 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1."]
19635    pub buttons: u16,
19636    #[doc = "The system to be controlled."]
19637    pub target: u8,
19638    #[doc = "A bitfield corresponding to the joystick buttons' 16-31 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 16."]
19639    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19640    pub buttons2: u16,
19641    #[doc = "Set bits to 1 to indicate which of the following extension fields contain valid data: bit 0: pitch, bit 1: roll, bit 2: aux1, bit 3: aux2, bit 4: aux3, bit 5: aux4, bit 6: aux5, bit 7: aux6"]
19642    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19643    pub enabled_extensions: u8,
19644    #[doc = "Pitch-only-axis, normalized to the range [-1000,1000]. Generally corresponds to pitch on vehicles with additional degrees of freedom. Valid if bit 0 of enabled_extensions field is set. Set to 0 if invalid."]
19645    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19646    pub s: i16,
19647    #[doc = "Roll-only-axis, normalized to the range [-1000,1000]. Generally corresponds to roll on vehicles with additional degrees of freedom. Valid if bit 1 of enabled_extensions field is set. Set to 0 if invalid."]
19648    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19649    pub t: i16,
19650    #[doc = "Aux continuous input field 1. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 2 of enabled_extensions field is set. 0 if bit 2 is unset."]
19651    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19652    pub aux1: i16,
19653    #[doc = "Aux continuous input field 2. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 3 of enabled_extensions field is set. 0 if bit 3 is unset."]
19654    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19655    pub aux2: i16,
19656    #[doc = "Aux continuous input field 3. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 4 of enabled_extensions field is set. 0 if bit 4 is unset."]
19657    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19658    pub aux3: i16,
19659    #[doc = "Aux continuous input field 4. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 5 of enabled_extensions field is set. 0 if bit 5 is unset."]
19660    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19661    pub aux4: i16,
19662    #[doc = "Aux continuous input field 5. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 6 of enabled_extensions field is set. 0 if bit 6 is unset."]
19663    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19664    pub aux5: i16,
19665    #[doc = "Aux continuous input field 6. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 7 of enabled_extensions field is set. 0 if bit 7 is unset."]
19666    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19667    pub aux6: i16,
19668}
19669impl MANUAL_CONTROL_DATA {
19670    pub const ENCODED_LEN: usize = 30usize;
19671    pub const DEFAULT: Self = Self {
19672        x: 0_i16,
19673        y: 0_i16,
19674        z: 0_i16,
19675        r: 0_i16,
19676        buttons: 0_u16,
19677        target: 0_u8,
19678        buttons2: 0_u16,
19679        enabled_extensions: 0_u8,
19680        s: 0_i16,
19681        t: 0_i16,
19682        aux1: 0_i16,
19683        aux2: 0_i16,
19684        aux3: 0_i16,
19685        aux4: 0_i16,
19686        aux5: 0_i16,
19687        aux6: 0_i16,
19688    };
19689    #[cfg(feature = "arbitrary")]
19690    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19691        use arbitrary::{Arbitrary, Unstructured};
19692        let mut buf = [0u8; 1024];
19693        rng.fill_bytes(&mut buf);
19694        let mut unstructured = Unstructured::new(&buf);
19695        Self::arbitrary(&mut unstructured).unwrap_or_default()
19696    }
19697}
19698impl Default for MANUAL_CONTROL_DATA {
19699    fn default() -> Self {
19700        Self::DEFAULT.clone()
19701    }
19702}
19703impl MessageData for MANUAL_CONTROL_DATA {
19704    type Message = MavMessage;
19705    const ID: u32 = 69u32;
19706    const NAME: &'static str = "MANUAL_CONTROL";
19707    const EXTRA_CRC: u8 = 243u8;
19708    const ENCODED_LEN: usize = 30usize;
19709    fn deser(
19710        _version: MavlinkVersion,
19711        __input: &[u8],
19712    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19713        let avail_len = __input.len();
19714        let mut payload_buf = [0; Self::ENCODED_LEN];
19715        let mut buf = if avail_len < Self::ENCODED_LEN {
19716            payload_buf[0..avail_len].copy_from_slice(__input);
19717            Bytes::new(&payload_buf)
19718        } else {
19719            Bytes::new(__input)
19720        };
19721        let mut __struct = Self::default();
19722        __struct.x = buf.get_i16_le()?;
19723        __struct.y = buf.get_i16_le()?;
19724        __struct.z = buf.get_i16_le()?;
19725        __struct.r = buf.get_i16_le()?;
19726        __struct.buttons = buf.get_u16_le()?;
19727        __struct.target = buf.get_u8()?;
19728        __struct.buttons2 = buf.get_u16_le()?;
19729        __struct.enabled_extensions = buf.get_u8()?;
19730        __struct.s = buf.get_i16_le()?;
19731        __struct.t = buf.get_i16_le()?;
19732        __struct.aux1 = buf.get_i16_le()?;
19733        __struct.aux2 = buf.get_i16_le()?;
19734        __struct.aux3 = buf.get_i16_le()?;
19735        __struct.aux4 = buf.get_i16_le()?;
19736        __struct.aux5 = buf.get_i16_le()?;
19737        __struct.aux6 = buf.get_i16_le()?;
19738        Ok(__struct)
19739    }
19740    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19741        let mut __tmp = BytesMut::new(bytes);
19742        #[allow(clippy::absurd_extreme_comparisons)]
19743        #[allow(unused_comparisons)]
19744        if __tmp.remaining() < Self::ENCODED_LEN {
19745            panic!(
19746                "buffer is too small (need {} bytes, but got {})",
19747                Self::ENCODED_LEN,
19748                __tmp.remaining(),
19749            )
19750        }
19751        __tmp.put_i16_le(self.x);
19752        __tmp.put_i16_le(self.y);
19753        __tmp.put_i16_le(self.z);
19754        __tmp.put_i16_le(self.r);
19755        __tmp.put_u16_le(self.buttons);
19756        __tmp.put_u8(self.target);
19757        if matches!(version, MavlinkVersion::V2) {
19758            __tmp.put_u16_le(self.buttons2);
19759            __tmp.put_u8(self.enabled_extensions);
19760            __tmp.put_i16_le(self.s);
19761            __tmp.put_i16_le(self.t);
19762            __tmp.put_i16_le(self.aux1);
19763            __tmp.put_i16_le(self.aux2);
19764            __tmp.put_i16_le(self.aux3);
19765            __tmp.put_i16_le(self.aux4);
19766            __tmp.put_i16_le(self.aux5);
19767            __tmp.put_i16_le(self.aux6);
19768            let len = __tmp.len();
19769            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19770        } else {
19771            __tmp.len()
19772        }
19773    }
19774}
19775#[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
19776#[doc = ""]
19777#[doc = "ID: 81"]
19778#[derive(Debug, Clone, PartialEq)]
19779#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19780#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19781#[cfg_attr(feature = "ts", derive(TS))]
19782#[cfg_attr(feature = "ts", ts(export))]
19783pub struct MANUAL_SETPOINT_DATA {
19784    #[doc = "Timestamp (time since system boot)."]
19785    pub time_boot_ms: u32,
19786    #[doc = "Desired roll rate"]
19787    pub roll: f32,
19788    #[doc = "Desired pitch rate"]
19789    pub pitch: f32,
19790    #[doc = "Desired yaw rate"]
19791    pub yaw: f32,
19792    #[doc = "Collective thrust, normalized to 0 .. 1"]
19793    pub thrust: f32,
19794    #[doc = "Flight mode switch position, 0.. 255"]
19795    pub mode_switch: u8,
19796    #[doc = "Override mode switch position, 0.. 255"]
19797    pub manual_override_switch: u8,
19798}
19799impl MANUAL_SETPOINT_DATA {
19800    pub const ENCODED_LEN: usize = 22usize;
19801    pub const DEFAULT: Self = Self {
19802        time_boot_ms: 0_u32,
19803        roll: 0.0_f32,
19804        pitch: 0.0_f32,
19805        yaw: 0.0_f32,
19806        thrust: 0.0_f32,
19807        mode_switch: 0_u8,
19808        manual_override_switch: 0_u8,
19809    };
19810    #[cfg(feature = "arbitrary")]
19811    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19812        use arbitrary::{Arbitrary, Unstructured};
19813        let mut buf = [0u8; 1024];
19814        rng.fill_bytes(&mut buf);
19815        let mut unstructured = Unstructured::new(&buf);
19816        Self::arbitrary(&mut unstructured).unwrap_or_default()
19817    }
19818}
19819impl Default for MANUAL_SETPOINT_DATA {
19820    fn default() -> Self {
19821        Self::DEFAULT.clone()
19822    }
19823}
19824impl MessageData for MANUAL_SETPOINT_DATA {
19825    type Message = MavMessage;
19826    const ID: u32 = 81u32;
19827    const NAME: &'static str = "MANUAL_SETPOINT";
19828    const EXTRA_CRC: u8 = 106u8;
19829    const ENCODED_LEN: usize = 22usize;
19830    fn deser(
19831        _version: MavlinkVersion,
19832        __input: &[u8],
19833    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19834        let avail_len = __input.len();
19835        let mut payload_buf = [0; Self::ENCODED_LEN];
19836        let mut buf = if avail_len < Self::ENCODED_LEN {
19837            payload_buf[0..avail_len].copy_from_slice(__input);
19838            Bytes::new(&payload_buf)
19839        } else {
19840            Bytes::new(__input)
19841        };
19842        let mut __struct = Self::default();
19843        __struct.time_boot_ms = buf.get_u32_le()?;
19844        __struct.roll = buf.get_f32_le()?;
19845        __struct.pitch = buf.get_f32_le()?;
19846        __struct.yaw = buf.get_f32_le()?;
19847        __struct.thrust = buf.get_f32_le()?;
19848        __struct.mode_switch = buf.get_u8()?;
19849        __struct.manual_override_switch = buf.get_u8()?;
19850        Ok(__struct)
19851    }
19852    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19853        let mut __tmp = BytesMut::new(bytes);
19854        #[allow(clippy::absurd_extreme_comparisons)]
19855        #[allow(unused_comparisons)]
19856        if __tmp.remaining() < Self::ENCODED_LEN {
19857            panic!(
19858                "buffer is too small (need {} bytes, but got {})",
19859                Self::ENCODED_LEN,
19860                __tmp.remaining(),
19861            )
19862        }
19863        __tmp.put_u32_le(self.time_boot_ms);
19864        __tmp.put_f32_le(self.roll);
19865        __tmp.put_f32_le(self.pitch);
19866        __tmp.put_f32_le(self.yaw);
19867        __tmp.put_f32_le(self.thrust);
19868        __tmp.put_u8(self.mode_switch);
19869        __tmp.put_u8(self.manual_override_switch);
19870        if matches!(version, MavlinkVersion::V2) {
19871            let len = __tmp.len();
19872            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19873        } else {
19874            __tmp.len()
19875        }
19876    }
19877}
19878#[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
19879#[doc = ""]
19880#[doc = "ID: 249"]
19881#[derive(Debug, Clone, PartialEq)]
19882#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19883#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19884#[cfg_attr(feature = "ts", derive(TS))]
19885#[cfg_attr(feature = "ts", ts(export))]
19886pub struct MEMORY_VECT_DATA {
19887    #[doc = "Starting address of the debug variables"]
19888    pub address: u16,
19889    #[doc = "Version code of the type variable. 0=unknown, type ignored and assumed int16_t. 1=as below"]
19890    pub ver: u8,
19891    #[doc = "Type code of the memory variables. for ver = 1: 0=16 x int16_t, 1=16 x uint16_t, 2=16 x Q15, 3=16 x 1Q14"]
19892    pub mavtype: u8,
19893    #[doc = "Memory contents at specified address"]
19894    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
19895    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
19896    pub value: [i8; 32],
19897}
19898impl MEMORY_VECT_DATA {
19899    pub const ENCODED_LEN: usize = 36usize;
19900    pub const DEFAULT: Self = Self {
19901        address: 0_u16,
19902        ver: 0_u8,
19903        mavtype: 0_u8,
19904        value: [0_i8; 32usize],
19905    };
19906    #[cfg(feature = "arbitrary")]
19907    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19908        use arbitrary::{Arbitrary, Unstructured};
19909        let mut buf = [0u8; 1024];
19910        rng.fill_bytes(&mut buf);
19911        let mut unstructured = Unstructured::new(&buf);
19912        Self::arbitrary(&mut unstructured).unwrap_or_default()
19913    }
19914}
19915impl Default for MEMORY_VECT_DATA {
19916    fn default() -> Self {
19917        Self::DEFAULT.clone()
19918    }
19919}
19920impl MessageData for MEMORY_VECT_DATA {
19921    type Message = MavMessage;
19922    const ID: u32 = 249u32;
19923    const NAME: &'static str = "MEMORY_VECT";
19924    const EXTRA_CRC: u8 = 204u8;
19925    const ENCODED_LEN: usize = 36usize;
19926    fn deser(
19927        _version: MavlinkVersion,
19928        __input: &[u8],
19929    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19930        let avail_len = __input.len();
19931        let mut payload_buf = [0; Self::ENCODED_LEN];
19932        let mut buf = if avail_len < Self::ENCODED_LEN {
19933            payload_buf[0..avail_len].copy_from_slice(__input);
19934            Bytes::new(&payload_buf)
19935        } else {
19936            Bytes::new(__input)
19937        };
19938        let mut __struct = Self::default();
19939        __struct.address = buf.get_u16_le()?;
19940        __struct.ver = buf.get_u8()?;
19941        __struct.mavtype = buf.get_u8()?;
19942        for v in &mut __struct.value {
19943            let val = buf.get_i8()?;
19944            *v = val;
19945        }
19946        Ok(__struct)
19947    }
19948    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19949        let mut __tmp = BytesMut::new(bytes);
19950        #[allow(clippy::absurd_extreme_comparisons)]
19951        #[allow(unused_comparisons)]
19952        if __tmp.remaining() < Self::ENCODED_LEN {
19953            panic!(
19954                "buffer is too small (need {} bytes, but got {})",
19955                Self::ENCODED_LEN,
19956                __tmp.remaining(),
19957            )
19958        }
19959        __tmp.put_u16_le(self.address);
19960        __tmp.put_u8(self.ver);
19961        __tmp.put_u8(self.mavtype);
19962        for val in &self.value {
19963            __tmp.put_i8(*val);
19964        }
19965        if matches!(version, MavlinkVersion::V2) {
19966            let len = __tmp.len();
19967            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19968        } else {
19969            __tmp.len()
19970        }
19971    }
19972}
19973#[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
19974#[doc = ""]
19975#[doc = "ID: 244"]
19976#[derive(Debug, Clone, PartialEq)]
19977#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19978#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19979#[cfg_attr(feature = "ts", derive(TS))]
19980#[cfg_attr(feature = "ts", ts(export))]
19981pub struct MESSAGE_INTERVAL_DATA {
19982    #[doc = "0 indicates the interval at which it is sent."]
19983    pub interval_us: i32,
19984    #[doc = "The ID of the requested MAVLink message. v1.0 is limited to 254 messages."]
19985    pub message_id: u16,
19986}
19987impl MESSAGE_INTERVAL_DATA {
19988    pub const ENCODED_LEN: usize = 6usize;
19989    pub const DEFAULT: Self = Self {
19990        interval_us: 0_i32,
19991        message_id: 0_u16,
19992    };
19993    #[cfg(feature = "arbitrary")]
19994    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19995        use arbitrary::{Arbitrary, Unstructured};
19996        let mut buf = [0u8; 1024];
19997        rng.fill_bytes(&mut buf);
19998        let mut unstructured = Unstructured::new(&buf);
19999        Self::arbitrary(&mut unstructured).unwrap_or_default()
20000    }
20001}
20002impl Default for MESSAGE_INTERVAL_DATA {
20003    fn default() -> Self {
20004        Self::DEFAULT.clone()
20005    }
20006}
20007impl MessageData for MESSAGE_INTERVAL_DATA {
20008    type Message = MavMessage;
20009    const ID: u32 = 244u32;
20010    const NAME: &'static str = "MESSAGE_INTERVAL";
20011    const EXTRA_CRC: u8 = 95u8;
20012    const ENCODED_LEN: usize = 6usize;
20013    fn deser(
20014        _version: MavlinkVersion,
20015        __input: &[u8],
20016    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20017        let avail_len = __input.len();
20018        let mut payload_buf = [0; Self::ENCODED_LEN];
20019        let mut buf = if avail_len < Self::ENCODED_LEN {
20020            payload_buf[0..avail_len].copy_from_slice(__input);
20021            Bytes::new(&payload_buf)
20022        } else {
20023            Bytes::new(__input)
20024        };
20025        let mut __struct = Self::default();
20026        __struct.interval_us = buf.get_i32_le()?;
20027        __struct.message_id = buf.get_u16_le()?;
20028        Ok(__struct)
20029    }
20030    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20031        let mut __tmp = BytesMut::new(bytes);
20032        #[allow(clippy::absurd_extreme_comparisons)]
20033        #[allow(unused_comparisons)]
20034        if __tmp.remaining() < Self::ENCODED_LEN {
20035            panic!(
20036                "buffer is too small (need {} bytes, but got {})",
20037                Self::ENCODED_LEN,
20038                __tmp.remaining(),
20039            )
20040        }
20041        __tmp.put_i32_le(self.interval_us);
20042        __tmp.put_u16_le(self.message_id);
20043        if matches!(version, MavlinkVersion::V2) {
20044            let len = __tmp.len();
20045            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20046        } else {
20047            __tmp.len()
20048        }
20049    }
20050}
20051#[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
20052#[doc = ""]
20053#[doc = "ID: 47"]
20054#[derive(Debug, Clone, PartialEq)]
20055#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20056#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20057#[cfg_attr(feature = "ts", derive(TS))]
20058#[cfg_attr(feature = "ts", ts(export))]
20059pub struct MISSION_ACK_DATA {
20060    #[doc = "System ID"]
20061    pub target_system: u8,
20062    #[doc = "Component ID"]
20063    pub target_component: u8,
20064    #[doc = "Mission result."]
20065    pub mavtype: MavMissionResult,
20066    #[doc = "Mission type."]
20067    #[cfg_attr(feature = "serde", serde(default))]
20068    pub mission_type: MavMissionType,
20069    #[doc = "Id of new on-vehicle mission, fence, or rally point plan (on upload to vehicle).         The id is calculated and returned by a vehicle when a new plan is uploaded by a GCS.         The only requirement on the id is that it must change when there is any change to the on-vehicle plan type (there is no requirement that the id be globally unique).         0 on download from the vehicle to the GCS (on download the ID is set in MISSION_COUNT).         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded."]
20070    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20071    pub opaque_id: u32,
20072}
20073impl MISSION_ACK_DATA {
20074    pub const ENCODED_LEN: usize = 8usize;
20075    pub const DEFAULT: Self = Self {
20076        target_system: 0_u8,
20077        target_component: 0_u8,
20078        mavtype: MavMissionResult::DEFAULT,
20079        mission_type: MavMissionType::DEFAULT,
20080        opaque_id: 0_u32,
20081    };
20082    #[cfg(feature = "arbitrary")]
20083    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20084        use arbitrary::{Arbitrary, Unstructured};
20085        let mut buf = [0u8; 1024];
20086        rng.fill_bytes(&mut buf);
20087        let mut unstructured = Unstructured::new(&buf);
20088        Self::arbitrary(&mut unstructured).unwrap_or_default()
20089    }
20090}
20091impl Default for MISSION_ACK_DATA {
20092    fn default() -> Self {
20093        Self::DEFAULT.clone()
20094    }
20095}
20096impl MessageData for MISSION_ACK_DATA {
20097    type Message = MavMessage;
20098    const ID: u32 = 47u32;
20099    const NAME: &'static str = "MISSION_ACK";
20100    const EXTRA_CRC: u8 = 153u8;
20101    const ENCODED_LEN: usize = 8usize;
20102    fn deser(
20103        _version: MavlinkVersion,
20104        __input: &[u8],
20105    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20106        let avail_len = __input.len();
20107        let mut payload_buf = [0; Self::ENCODED_LEN];
20108        let mut buf = if avail_len < Self::ENCODED_LEN {
20109            payload_buf[0..avail_len].copy_from_slice(__input);
20110            Bytes::new(&payload_buf)
20111        } else {
20112            Bytes::new(__input)
20113        };
20114        let mut __struct = Self::default();
20115        __struct.target_system = buf.get_u8()?;
20116        __struct.target_component = buf.get_u8()?;
20117        let tmp = buf.get_u8()?;
20118        __struct.mavtype =
20119            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20120                enum_type: "MavMissionResult",
20121                value: tmp as u64,
20122            })?;
20123        let tmp = buf.get_u8()?;
20124        __struct.mission_type =
20125            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20126                enum_type: "MavMissionType",
20127                value: tmp as u64,
20128            })?;
20129        __struct.opaque_id = buf.get_u32_le()?;
20130        Ok(__struct)
20131    }
20132    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20133        let mut __tmp = BytesMut::new(bytes);
20134        #[allow(clippy::absurd_extreme_comparisons)]
20135        #[allow(unused_comparisons)]
20136        if __tmp.remaining() < Self::ENCODED_LEN {
20137            panic!(
20138                "buffer is too small (need {} bytes, but got {})",
20139                Self::ENCODED_LEN,
20140                __tmp.remaining(),
20141            )
20142        }
20143        __tmp.put_u8(self.target_system);
20144        __tmp.put_u8(self.target_component);
20145        __tmp.put_u8(self.mavtype as u8);
20146        if matches!(version, MavlinkVersion::V2) {
20147            __tmp.put_u8(self.mission_type as u8);
20148            __tmp.put_u32_le(self.opaque_id);
20149            let len = __tmp.len();
20150            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20151        } else {
20152            __tmp.len()
20153        }
20154    }
20155}
20156#[doc = "Delete all mission items at once."]
20157#[doc = ""]
20158#[doc = "ID: 45"]
20159#[derive(Debug, Clone, PartialEq)]
20160#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20161#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20162#[cfg_attr(feature = "ts", derive(TS))]
20163#[cfg_attr(feature = "ts", ts(export))]
20164pub struct MISSION_CLEAR_ALL_DATA {
20165    #[doc = "System ID"]
20166    pub target_system: u8,
20167    #[doc = "Component ID"]
20168    pub target_component: u8,
20169    #[doc = "Mission type."]
20170    #[cfg_attr(feature = "serde", serde(default))]
20171    pub mission_type: MavMissionType,
20172}
20173impl MISSION_CLEAR_ALL_DATA {
20174    pub const ENCODED_LEN: usize = 3usize;
20175    pub const DEFAULT: Self = Self {
20176        target_system: 0_u8,
20177        target_component: 0_u8,
20178        mission_type: MavMissionType::DEFAULT,
20179    };
20180    #[cfg(feature = "arbitrary")]
20181    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20182        use arbitrary::{Arbitrary, Unstructured};
20183        let mut buf = [0u8; 1024];
20184        rng.fill_bytes(&mut buf);
20185        let mut unstructured = Unstructured::new(&buf);
20186        Self::arbitrary(&mut unstructured).unwrap_or_default()
20187    }
20188}
20189impl Default for MISSION_CLEAR_ALL_DATA {
20190    fn default() -> Self {
20191        Self::DEFAULT.clone()
20192    }
20193}
20194impl MessageData for MISSION_CLEAR_ALL_DATA {
20195    type Message = MavMessage;
20196    const ID: u32 = 45u32;
20197    const NAME: &'static str = "MISSION_CLEAR_ALL";
20198    const EXTRA_CRC: u8 = 232u8;
20199    const ENCODED_LEN: usize = 3usize;
20200    fn deser(
20201        _version: MavlinkVersion,
20202        __input: &[u8],
20203    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20204        let avail_len = __input.len();
20205        let mut payload_buf = [0; Self::ENCODED_LEN];
20206        let mut buf = if avail_len < Self::ENCODED_LEN {
20207            payload_buf[0..avail_len].copy_from_slice(__input);
20208            Bytes::new(&payload_buf)
20209        } else {
20210            Bytes::new(__input)
20211        };
20212        let mut __struct = Self::default();
20213        __struct.target_system = buf.get_u8()?;
20214        __struct.target_component = buf.get_u8()?;
20215        let tmp = buf.get_u8()?;
20216        __struct.mission_type =
20217            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20218                enum_type: "MavMissionType",
20219                value: tmp as u64,
20220            })?;
20221        Ok(__struct)
20222    }
20223    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20224        let mut __tmp = BytesMut::new(bytes);
20225        #[allow(clippy::absurd_extreme_comparisons)]
20226        #[allow(unused_comparisons)]
20227        if __tmp.remaining() < Self::ENCODED_LEN {
20228            panic!(
20229                "buffer is too small (need {} bytes, but got {})",
20230                Self::ENCODED_LEN,
20231                __tmp.remaining(),
20232            )
20233        }
20234        __tmp.put_u8(self.target_system);
20235        __tmp.put_u8(self.target_component);
20236        if matches!(version, MavlinkVersion::V2) {
20237            __tmp.put_u8(self.mission_type as u8);
20238            let len = __tmp.len();
20239            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20240        } else {
20241            __tmp.len()
20242        }
20243    }
20244}
20245#[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
20246#[doc = ""]
20247#[doc = "ID: 44"]
20248#[derive(Debug, Clone, PartialEq)]
20249#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20250#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20251#[cfg_attr(feature = "ts", derive(TS))]
20252#[cfg_attr(feature = "ts", ts(export))]
20253pub struct MISSION_COUNT_DATA {
20254    #[doc = "Number of mission items in the sequence"]
20255    pub count: u16,
20256    #[doc = "System ID"]
20257    pub target_system: u8,
20258    #[doc = "Component ID"]
20259    pub target_component: u8,
20260    #[doc = "Mission type."]
20261    #[cfg_attr(feature = "serde", serde(default))]
20262    pub mission_type: MavMissionType,
20263    #[doc = "Id of current on-vehicle mission, fence, or rally point plan (on download from vehicle).         This field is used when downloading a plan from a vehicle to a GCS.         0 on upload to the vehicle from GCS.         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded.         The ids are recalculated by the vehicle when any part of the on-vehicle plan changes (when a new plan is uploaded, the vehicle returns the new id to the GCS in MISSION_ACK)."]
20264    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20265    pub opaque_id: u32,
20266}
20267impl MISSION_COUNT_DATA {
20268    pub const ENCODED_LEN: usize = 9usize;
20269    pub const DEFAULT: Self = Self {
20270        count: 0_u16,
20271        target_system: 0_u8,
20272        target_component: 0_u8,
20273        mission_type: MavMissionType::DEFAULT,
20274        opaque_id: 0_u32,
20275    };
20276    #[cfg(feature = "arbitrary")]
20277    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20278        use arbitrary::{Arbitrary, Unstructured};
20279        let mut buf = [0u8; 1024];
20280        rng.fill_bytes(&mut buf);
20281        let mut unstructured = Unstructured::new(&buf);
20282        Self::arbitrary(&mut unstructured).unwrap_or_default()
20283    }
20284}
20285impl Default for MISSION_COUNT_DATA {
20286    fn default() -> Self {
20287        Self::DEFAULT.clone()
20288    }
20289}
20290impl MessageData for MISSION_COUNT_DATA {
20291    type Message = MavMessage;
20292    const ID: u32 = 44u32;
20293    const NAME: &'static str = "MISSION_COUNT";
20294    const EXTRA_CRC: u8 = 221u8;
20295    const ENCODED_LEN: usize = 9usize;
20296    fn deser(
20297        _version: MavlinkVersion,
20298        __input: &[u8],
20299    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20300        let avail_len = __input.len();
20301        let mut payload_buf = [0; Self::ENCODED_LEN];
20302        let mut buf = if avail_len < Self::ENCODED_LEN {
20303            payload_buf[0..avail_len].copy_from_slice(__input);
20304            Bytes::new(&payload_buf)
20305        } else {
20306            Bytes::new(__input)
20307        };
20308        let mut __struct = Self::default();
20309        __struct.count = buf.get_u16_le()?;
20310        __struct.target_system = buf.get_u8()?;
20311        __struct.target_component = buf.get_u8()?;
20312        let tmp = buf.get_u8()?;
20313        __struct.mission_type =
20314            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20315                enum_type: "MavMissionType",
20316                value: tmp as u64,
20317            })?;
20318        __struct.opaque_id = buf.get_u32_le()?;
20319        Ok(__struct)
20320    }
20321    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20322        let mut __tmp = BytesMut::new(bytes);
20323        #[allow(clippy::absurd_extreme_comparisons)]
20324        #[allow(unused_comparisons)]
20325        if __tmp.remaining() < Self::ENCODED_LEN {
20326            panic!(
20327                "buffer is too small (need {} bytes, but got {})",
20328                Self::ENCODED_LEN,
20329                __tmp.remaining(),
20330            )
20331        }
20332        __tmp.put_u16_le(self.count);
20333        __tmp.put_u8(self.target_system);
20334        __tmp.put_u8(self.target_component);
20335        if matches!(version, MavlinkVersion::V2) {
20336            __tmp.put_u8(self.mission_type as u8);
20337            __tmp.put_u32_le(self.opaque_id);
20338            let len = __tmp.len();
20339            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20340        } else {
20341            __tmp.len()
20342        }
20343    }
20344}
20345#[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
20346#[doc = ""]
20347#[doc = "ID: 42"]
20348#[derive(Debug, Clone, PartialEq)]
20349#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20350#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20351#[cfg_attr(feature = "ts", derive(TS))]
20352#[cfg_attr(feature = "ts", ts(export))]
20353pub struct MISSION_CURRENT_DATA {
20354    #[doc = "Sequence"]
20355    pub seq: u16,
20356    #[doc = "Total number of mission items on vehicle (on last item, sequence == total). If the autopilot stores its home location as part of the mission this will be excluded from the total. 0: Not supported, UINT16_MAX if no mission is present on the vehicle."]
20357    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20358    pub total: u16,
20359    #[doc = "Mission state machine state. MISSION_STATE_UNKNOWN if state reporting not supported."]
20360    #[cfg_attr(feature = "serde", serde(default))]
20361    pub mission_state: MissionState,
20362    #[doc = "Vehicle is in a mode that can execute mission items or suspended. 0: Unknown, 1: In mission mode, 2: Suspended (not in mission mode)."]
20363    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20364    pub mission_mode: u8,
20365    #[doc = "Id of current on-vehicle mission plan, or 0 if IDs are not supported or there is no mission loaded. GCS can use this to track changes to the mission plan type. The same value is returned on mission upload (in the MISSION_ACK)."]
20366    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20367    pub mission_id: u32,
20368    #[doc = "Id of current on-vehicle fence plan, or 0 if IDs are not supported or there is no fence loaded. GCS can use this to track changes to the fence plan type. The same value is returned on fence upload (in the MISSION_ACK)."]
20369    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20370    pub fence_id: u32,
20371    #[doc = "Id of current on-vehicle rally point plan, or 0 if IDs are not supported or there are no rally points loaded. GCS can use this to track changes to the rally point plan type. The same value is returned on rally point upload (in the MISSION_ACK)."]
20372    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20373    pub rally_points_id: u32,
20374}
20375impl MISSION_CURRENT_DATA {
20376    pub const ENCODED_LEN: usize = 18usize;
20377    pub const DEFAULT: Self = Self {
20378        seq: 0_u16,
20379        total: 0_u16,
20380        mission_state: MissionState::DEFAULT,
20381        mission_mode: 0_u8,
20382        mission_id: 0_u32,
20383        fence_id: 0_u32,
20384        rally_points_id: 0_u32,
20385    };
20386    #[cfg(feature = "arbitrary")]
20387    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20388        use arbitrary::{Arbitrary, Unstructured};
20389        let mut buf = [0u8; 1024];
20390        rng.fill_bytes(&mut buf);
20391        let mut unstructured = Unstructured::new(&buf);
20392        Self::arbitrary(&mut unstructured).unwrap_or_default()
20393    }
20394}
20395impl Default for MISSION_CURRENT_DATA {
20396    fn default() -> Self {
20397        Self::DEFAULT.clone()
20398    }
20399}
20400impl MessageData for MISSION_CURRENT_DATA {
20401    type Message = MavMessage;
20402    const ID: u32 = 42u32;
20403    const NAME: &'static str = "MISSION_CURRENT";
20404    const EXTRA_CRC: u8 = 28u8;
20405    const ENCODED_LEN: usize = 18usize;
20406    fn deser(
20407        _version: MavlinkVersion,
20408        __input: &[u8],
20409    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20410        let avail_len = __input.len();
20411        let mut payload_buf = [0; Self::ENCODED_LEN];
20412        let mut buf = if avail_len < Self::ENCODED_LEN {
20413            payload_buf[0..avail_len].copy_from_slice(__input);
20414            Bytes::new(&payload_buf)
20415        } else {
20416            Bytes::new(__input)
20417        };
20418        let mut __struct = Self::default();
20419        __struct.seq = buf.get_u16_le()?;
20420        __struct.total = buf.get_u16_le()?;
20421        let tmp = buf.get_u8()?;
20422        __struct.mission_state =
20423            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20424                enum_type: "MissionState",
20425                value: tmp as u64,
20426            })?;
20427        __struct.mission_mode = buf.get_u8()?;
20428        __struct.mission_id = buf.get_u32_le()?;
20429        __struct.fence_id = buf.get_u32_le()?;
20430        __struct.rally_points_id = buf.get_u32_le()?;
20431        Ok(__struct)
20432    }
20433    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20434        let mut __tmp = BytesMut::new(bytes);
20435        #[allow(clippy::absurd_extreme_comparisons)]
20436        #[allow(unused_comparisons)]
20437        if __tmp.remaining() < Self::ENCODED_LEN {
20438            panic!(
20439                "buffer is too small (need {} bytes, but got {})",
20440                Self::ENCODED_LEN,
20441                __tmp.remaining(),
20442            )
20443        }
20444        __tmp.put_u16_le(self.seq);
20445        if matches!(version, MavlinkVersion::V2) {
20446            __tmp.put_u16_le(self.total);
20447            __tmp.put_u8(self.mission_state as u8);
20448            __tmp.put_u8(self.mission_mode);
20449            __tmp.put_u32_le(self.mission_id);
20450            __tmp.put_u32_le(self.fence_id);
20451            __tmp.put_u32_le(self.rally_points_id);
20452            let len = __tmp.len();
20453            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20454        } else {
20455            __tmp.len()
20456        }
20457    }
20458}
20459#[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
20460#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
20461#[doc = ""]
20462#[doc = "ID: 39"]
20463#[derive(Debug, Clone, PartialEq)]
20464#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20465#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20466#[cfg_attr(feature = "ts", derive(TS))]
20467#[cfg_attr(feature = "ts", ts(export))]
20468pub struct MISSION_ITEM_DATA {
20469    #[doc = "PARAM1, see MAV_CMD enum"]
20470    pub param1: f32,
20471    #[doc = "PARAM2, see MAV_CMD enum"]
20472    pub param2: f32,
20473    #[doc = "PARAM3, see MAV_CMD enum"]
20474    pub param3: f32,
20475    #[doc = "PARAM4, see MAV_CMD enum"]
20476    pub param4: f32,
20477    #[doc = "PARAM5 / local: X coordinate, global: latitude"]
20478    pub x: f32,
20479    #[doc = "PARAM6 / local: Y coordinate, global: longitude"]
20480    pub y: f32,
20481    #[doc = "PARAM7 / local: Z coordinate, global: altitude (relative or absolute, depending on frame)."]
20482    pub z: f32,
20483    #[doc = "Sequence"]
20484    pub seq: u16,
20485    #[doc = "The scheduled action for the waypoint."]
20486    pub command: MavCmd,
20487    #[doc = "System ID"]
20488    pub target_system: u8,
20489    #[doc = "Component ID"]
20490    pub target_component: u8,
20491    #[doc = "The coordinate system of the waypoint."]
20492    pub frame: MavFrame,
20493    #[doc = "false:0, true:1"]
20494    pub current: u8,
20495    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
20496    pub autocontinue: u8,
20497    #[doc = "Mission type."]
20498    #[cfg_attr(feature = "serde", serde(default))]
20499    pub mission_type: MavMissionType,
20500}
20501impl MISSION_ITEM_DATA {
20502    pub const ENCODED_LEN: usize = 38usize;
20503    pub const DEFAULT: Self = Self {
20504        param1: 0.0_f32,
20505        param2: 0.0_f32,
20506        param3: 0.0_f32,
20507        param4: 0.0_f32,
20508        x: 0.0_f32,
20509        y: 0.0_f32,
20510        z: 0.0_f32,
20511        seq: 0_u16,
20512        command: MavCmd::DEFAULT,
20513        target_system: 0_u8,
20514        target_component: 0_u8,
20515        frame: MavFrame::DEFAULT,
20516        current: 0_u8,
20517        autocontinue: 0_u8,
20518        mission_type: MavMissionType::DEFAULT,
20519    };
20520    #[cfg(feature = "arbitrary")]
20521    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20522        use arbitrary::{Arbitrary, Unstructured};
20523        let mut buf = [0u8; 1024];
20524        rng.fill_bytes(&mut buf);
20525        let mut unstructured = Unstructured::new(&buf);
20526        Self::arbitrary(&mut unstructured).unwrap_or_default()
20527    }
20528}
20529impl Default for MISSION_ITEM_DATA {
20530    fn default() -> Self {
20531        Self::DEFAULT.clone()
20532    }
20533}
20534impl MessageData for MISSION_ITEM_DATA {
20535    type Message = MavMessage;
20536    const ID: u32 = 39u32;
20537    const NAME: &'static str = "MISSION_ITEM";
20538    const EXTRA_CRC: u8 = 254u8;
20539    const ENCODED_LEN: usize = 38usize;
20540    fn deser(
20541        _version: MavlinkVersion,
20542        __input: &[u8],
20543    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20544        let avail_len = __input.len();
20545        let mut payload_buf = [0; Self::ENCODED_LEN];
20546        let mut buf = if avail_len < Self::ENCODED_LEN {
20547            payload_buf[0..avail_len].copy_from_slice(__input);
20548            Bytes::new(&payload_buf)
20549        } else {
20550            Bytes::new(__input)
20551        };
20552        let mut __struct = Self::default();
20553        __struct.param1 = buf.get_f32_le()?;
20554        __struct.param2 = buf.get_f32_le()?;
20555        __struct.param3 = buf.get_f32_le()?;
20556        __struct.param4 = buf.get_f32_le()?;
20557        __struct.x = buf.get_f32_le()?;
20558        __struct.y = buf.get_f32_le()?;
20559        __struct.z = buf.get_f32_le()?;
20560        __struct.seq = buf.get_u16_le()?;
20561        let tmp = buf.get_u16_le()?;
20562        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
20563            ::mavlink_core::error::ParserError::InvalidEnum {
20564                enum_type: "MavCmd",
20565                value: tmp as u64,
20566            },
20567        )?;
20568        __struct.target_system = buf.get_u8()?;
20569        __struct.target_component = buf.get_u8()?;
20570        let tmp = buf.get_u8()?;
20571        __struct.frame =
20572            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20573                enum_type: "MavFrame",
20574                value: tmp as u64,
20575            })?;
20576        __struct.current = buf.get_u8()?;
20577        __struct.autocontinue = buf.get_u8()?;
20578        let tmp = buf.get_u8()?;
20579        __struct.mission_type =
20580            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20581                enum_type: "MavMissionType",
20582                value: tmp as u64,
20583            })?;
20584        Ok(__struct)
20585    }
20586    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20587        let mut __tmp = BytesMut::new(bytes);
20588        #[allow(clippy::absurd_extreme_comparisons)]
20589        #[allow(unused_comparisons)]
20590        if __tmp.remaining() < Self::ENCODED_LEN {
20591            panic!(
20592                "buffer is too small (need {} bytes, but got {})",
20593                Self::ENCODED_LEN,
20594                __tmp.remaining(),
20595            )
20596        }
20597        __tmp.put_f32_le(self.param1);
20598        __tmp.put_f32_le(self.param2);
20599        __tmp.put_f32_le(self.param3);
20600        __tmp.put_f32_le(self.param4);
20601        __tmp.put_f32_le(self.x);
20602        __tmp.put_f32_le(self.y);
20603        __tmp.put_f32_le(self.z);
20604        __tmp.put_u16_le(self.seq);
20605        __tmp.put_u16_le(self.command as u16);
20606        __tmp.put_u8(self.target_system);
20607        __tmp.put_u8(self.target_component);
20608        __tmp.put_u8(self.frame as u8);
20609        __tmp.put_u8(self.current);
20610        __tmp.put_u8(self.autocontinue);
20611        if matches!(version, MavlinkVersion::V2) {
20612            __tmp.put_u8(self.mission_type as u8);
20613            let len = __tmp.len();
20614            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20615        } else {
20616            __tmp.len()
20617        }
20618    }
20619}
20620#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
20621#[doc = ""]
20622#[doc = "ID: 73"]
20623#[derive(Debug, Clone, PartialEq)]
20624#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20625#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20626#[cfg_attr(feature = "ts", derive(TS))]
20627#[cfg_attr(feature = "ts", ts(export))]
20628pub struct MISSION_ITEM_INT_DATA {
20629    #[doc = "PARAM1, see MAV_CMD enum"]
20630    pub param1: f32,
20631    #[doc = "PARAM2, see MAV_CMD enum"]
20632    pub param2: f32,
20633    #[doc = "PARAM3, see MAV_CMD enum"]
20634    pub param3: f32,
20635    #[doc = "PARAM4, see MAV_CMD enum"]
20636    pub param4: f32,
20637    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
20638    pub x: i32,
20639    #[doc = "PARAM6 / y position: local: x position in meters * 1e4, global: longitude in degrees *10^7"]
20640    pub y: i32,
20641    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame."]
20642    pub z: f32,
20643    #[doc = "Waypoint ID (sequence number). Starts at zero. Increases monotonically for each waypoint, no gaps in the sequence (0,1,2,3,4)."]
20644    pub seq: u16,
20645    #[doc = "The scheduled action for the waypoint."]
20646    pub command: MavCmd,
20647    #[doc = "System ID"]
20648    pub target_system: u8,
20649    #[doc = "Component ID"]
20650    pub target_component: u8,
20651    #[doc = "The coordinate system of the waypoint."]
20652    pub frame: MavFrame,
20653    #[doc = "false:0, true:1"]
20654    pub current: u8,
20655    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
20656    pub autocontinue: u8,
20657    #[doc = "Mission type."]
20658    #[cfg_attr(feature = "serde", serde(default))]
20659    pub mission_type: MavMissionType,
20660}
20661impl MISSION_ITEM_INT_DATA {
20662    pub const ENCODED_LEN: usize = 38usize;
20663    pub const DEFAULT: Self = Self {
20664        param1: 0.0_f32,
20665        param2: 0.0_f32,
20666        param3: 0.0_f32,
20667        param4: 0.0_f32,
20668        x: 0_i32,
20669        y: 0_i32,
20670        z: 0.0_f32,
20671        seq: 0_u16,
20672        command: MavCmd::DEFAULT,
20673        target_system: 0_u8,
20674        target_component: 0_u8,
20675        frame: MavFrame::DEFAULT,
20676        current: 0_u8,
20677        autocontinue: 0_u8,
20678        mission_type: MavMissionType::DEFAULT,
20679    };
20680    #[cfg(feature = "arbitrary")]
20681    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20682        use arbitrary::{Arbitrary, Unstructured};
20683        let mut buf = [0u8; 1024];
20684        rng.fill_bytes(&mut buf);
20685        let mut unstructured = Unstructured::new(&buf);
20686        Self::arbitrary(&mut unstructured).unwrap_or_default()
20687    }
20688}
20689impl Default for MISSION_ITEM_INT_DATA {
20690    fn default() -> Self {
20691        Self::DEFAULT.clone()
20692    }
20693}
20694impl MessageData for MISSION_ITEM_INT_DATA {
20695    type Message = MavMessage;
20696    const ID: u32 = 73u32;
20697    const NAME: &'static str = "MISSION_ITEM_INT";
20698    const EXTRA_CRC: u8 = 38u8;
20699    const ENCODED_LEN: usize = 38usize;
20700    fn deser(
20701        _version: MavlinkVersion,
20702        __input: &[u8],
20703    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20704        let avail_len = __input.len();
20705        let mut payload_buf = [0; Self::ENCODED_LEN];
20706        let mut buf = if avail_len < Self::ENCODED_LEN {
20707            payload_buf[0..avail_len].copy_from_slice(__input);
20708            Bytes::new(&payload_buf)
20709        } else {
20710            Bytes::new(__input)
20711        };
20712        let mut __struct = Self::default();
20713        __struct.param1 = buf.get_f32_le()?;
20714        __struct.param2 = buf.get_f32_le()?;
20715        __struct.param3 = buf.get_f32_le()?;
20716        __struct.param4 = buf.get_f32_le()?;
20717        __struct.x = buf.get_i32_le()?;
20718        __struct.y = buf.get_i32_le()?;
20719        __struct.z = buf.get_f32_le()?;
20720        __struct.seq = buf.get_u16_le()?;
20721        let tmp = buf.get_u16_le()?;
20722        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
20723            ::mavlink_core::error::ParserError::InvalidEnum {
20724                enum_type: "MavCmd",
20725                value: tmp as u64,
20726            },
20727        )?;
20728        __struct.target_system = buf.get_u8()?;
20729        __struct.target_component = buf.get_u8()?;
20730        let tmp = buf.get_u8()?;
20731        __struct.frame =
20732            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20733                enum_type: "MavFrame",
20734                value: tmp as u64,
20735            })?;
20736        __struct.current = buf.get_u8()?;
20737        __struct.autocontinue = buf.get_u8()?;
20738        let tmp = buf.get_u8()?;
20739        __struct.mission_type =
20740            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20741                enum_type: "MavMissionType",
20742                value: tmp as u64,
20743            })?;
20744        Ok(__struct)
20745    }
20746    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20747        let mut __tmp = BytesMut::new(bytes);
20748        #[allow(clippy::absurd_extreme_comparisons)]
20749        #[allow(unused_comparisons)]
20750        if __tmp.remaining() < Self::ENCODED_LEN {
20751            panic!(
20752                "buffer is too small (need {} bytes, but got {})",
20753                Self::ENCODED_LEN,
20754                __tmp.remaining(),
20755            )
20756        }
20757        __tmp.put_f32_le(self.param1);
20758        __tmp.put_f32_le(self.param2);
20759        __tmp.put_f32_le(self.param3);
20760        __tmp.put_f32_le(self.param4);
20761        __tmp.put_i32_le(self.x);
20762        __tmp.put_i32_le(self.y);
20763        __tmp.put_f32_le(self.z);
20764        __tmp.put_u16_le(self.seq);
20765        __tmp.put_u16_le(self.command as u16);
20766        __tmp.put_u8(self.target_system);
20767        __tmp.put_u8(self.target_component);
20768        __tmp.put_u8(self.frame as u8);
20769        __tmp.put_u8(self.current);
20770        __tmp.put_u8(self.autocontinue);
20771        if matches!(version, MavlinkVersion::V2) {
20772            __tmp.put_u8(self.mission_type as u8);
20773            let len = __tmp.len();
20774            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20775        } else {
20776            __tmp.len()
20777        }
20778    }
20779}
20780#[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
20781#[doc = ""]
20782#[doc = "ID: 46"]
20783#[derive(Debug, Clone, PartialEq)]
20784#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20785#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20786#[cfg_attr(feature = "ts", derive(TS))]
20787#[cfg_attr(feature = "ts", ts(export))]
20788pub struct MISSION_ITEM_REACHED_DATA {
20789    #[doc = "Sequence"]
20790    pub seq: u16,
20791}
20792impl MISSION_ITEM_REACHED_DATA {
20793    pub const ENCODED_LEN: usize = 2usize;
20794    pub const DEFAULT: Self = Self { seq: 0_u16 };
20795    #[cfg(feature = "arbitrary")]
20796    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20797        use arbitrary::{Arbitrary, Unstructured};
20798        let mut buf = [0u8; 1024];
20799        rng.fill_bytes(&mut buf);
20800        let mut unstructured = Unstructured::new(&buf);
20801        Self::arbitrary(&mut unstructured).unwrap_or_default()
20802    }
20803}
20804impl Default for MISSION_ITEM_REACHED_DATA {
20805    fn default() -> Self {
20806        Self::DEFAULT.clone()
20807    }
20808}
20809impl MessageData for MISSION_ITEM_REACHED_DATA {
20810    type Message = MavMessage;
20811    const ID: u32 = 46u32;
20812    const NAME: &'static str = "MISSION_ITEM_REACHED";
20813    const EXTRA_CRC: u8 = 11u8;
20814    const ENCODED_LEN: usize = 2usize;
20815    fn deser(
20816        _version: MavlinkVersion,
20817        __input: &[u8],
20818    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20819        let avail_len = __input.len();
20820        let mut payload_buf = [0; Self::ENCODED_LEN];
20821        let mut buf = if avail_len < Self::ENCODED_LEN {
20822            payload_buf[0..avail_len].copy_from_slice(__input);
20823            Bytes::new(&payload_buf)
20824        } else {
20825            Bytes::new(__input)
20826        };
20827        let mut __struct = Self::default();
20828        __struct.seq = buf.get_u16_le()?;
20829        Ok(__struct)
20830    }
20831    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20832        let mut __tmp = BytesMut::new(bytes);
20833        #[allow(clippy::absurd_extreme_comparisons)]
20834        #[allow(unused_comparisons)]
20835        if __tmp.remaining() < Self::ENCODED_LEN {
20836            panic!(
20837                "buffer is too small (need {} bytes, but got {})",
20838                Self::ENCODED_LEN,
20839                __tmp.remaining(),
20840            )
20841        }
20842        __tmp.put_u16_le(self.seq);
20843        if matches!(version, MavlinkVersion::V2) {
20844            let len = __tmp.len();
20845            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20846        } else {
20847            __tmp.len()
20848        }
20849    }
20850}
20851#[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
20852#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
20853#[doc = ""]
20854#[doc = "ID: 40"]
20855#[derive(Debug, Clone, PartialEq)]
20856#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20857#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20858#[cfg_attr(feature = "ts", derive(TS))]
20859#[cfg_attr(feature = "ts", ts(export))]
20860pub struct MISSION_REQUEST_DATA {
20861    #[doc = "Sequence"]
20862    pub seq: u16,
20863    #[doc = "System ID"]
20864    pub target_system: u8,
20865    #[doc = "Component ID"]
20866    pub target_component: u8,
20867    #[doc = "Mission type."]
20868    #[cfg_attr(feature = "serde", serde(default))]
20869    pub mission_type: MavMissionType,
20870}
20871impl MISSION_REQUEST_DATA {
20872    pub const ENCODED_LEN: usize = 5usize;
20873    pub const DEFAULT: Self = Self {
20874        seq: 0_u16,
20875        target_system: 0_u8,
20876        target_component: 0_u8,
20877        mission_type: MavMissionType::DEFAULT,
20878    };
20879    #[cfg(feature = "arbitrary")]
20880    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20881        use arbitrary::{Arbitrary, Unstructured};
20882        let mut buf = [0u8; 1024];
20883        rng.fill_bytes(&mut buf);
20884        let mut unstructured = Unstructured::new(&buf);
20885        Self::arbitrary(&mut unstructured).unwrap_or_default()
20886    }
20887}
20888impl Default for MISSION_REQUEST_DATA {
20889    fn default() -> Self {
20890        Self::DEFAULT.clone()
20891    }
20892}
20893impl MessageData for MISSION_REQUEST_DATA {
20894    type Message = MavMessage;
20895    const ID: u32 = 40u32;
20896    const NAME: &'static str = "MISSION_REQUEST";
20897    const EXTRA_CRC: u8 = 230u8;
20898    const ENCODED_LEN: usize = 5usize;
20899    fn deser(
20900        _version: MavlinkVersion,
20901        __input: &[u8],
20902    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20903        let avail_len = __input.len();
20904        let mut payload_buf = [0; Self::ENCODED_LEN];
20905        let mut buf = if avail_len < Self::ENCODED_LEN {
20906            payload_buf[0..avail_len].copy_from_slice(__input);
20907            Bytes::new(&payload_buf)
20908        } else {
20909            Bytes::new(__input)
20910        };
20911        let mut __struct = Self::default();
20912        __struct.seq = buf.get_u16_le()?;
20913        __struct.target_system = buf.get_u8()?;
20914        __struct.target_component = buf.get_u8()?;
20915        let tmp = buf.get_u8()?;
20916        __struct.mission_type =
20917            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20918                enum_type: "MavMissionType",
20919                value: tmp as u64,
20920            })?;
20921        Ok(__struct)
20922    }
20923    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20924        let mut __tmp = BytesMut::new(bytes);
20925        #[allow(clippy::absurd_extreme_comparisons)]
20926        #[allow(unused_comparisons)]
20927        if __tmp.remaining() < Self::ENCODED_LEN {
20928            panic!(
20929                "buffer is too small (need {} bytes, but got {})",
20930                Self::ENCODED_LEN,
20931                __tmp.remaining(),
20932            )
20933        }
20934        __tmp.put_u16_le(self.seq);
20935        __tmp.put_u8(self.target_system);
20936        __tmp.put_u8(self.target_component);
20937        if matches!(version, MavlinkVersion::V2) {
20938            __tmp.put_u8(self.mission_type as u8);
20939            let len = __tmp.len();
20940            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20941        } else {
20942            __tmp.len()
20943        }
20944    }
20945}
20946#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
20947#[doc = ""]
20948#[doc = "ID: 51"]
20949#[derive(Debug, Clone, PartialEq)]
20950#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20951#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20952#[cfg_attr(feature = "ts", derive(TS))]
20953#[cfg_attr(feature = "ts", ts(export))]
20954pub struct MISSION_REQUEST_INT_DATA {
20955    #[doc = "Sequence"]
20956    pub seq: u16,
20957    #[doc = "System ID"]
20958    pub target_system: u8,
20959    #[doc = "Component ID"]
20960    pub target_component: u8,
20961    #[doc = "Mission type."]
20962    #[cfg_attr(feature = "serde", serde(default))]
20963    pub mission_type: MavMissionType,
20964}
20965impl MISSION_REQUEST_INT_DATA {
20966    pub const ENCODED_LEN: usize = 5usize;
20967    pub const DEFAULT: Self = Self {
20968        seq: 0_u16,
20969        target_system: 0_u8,
20970        target_component: 0_u8,
20971        mission_type: MavMissionType::DEFAULT,
20972    };
20973    #[cfg(feature = "arbitrary")]
20974    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20975        use arbitrary::{Arbitrary, Unstructured};
20976        let mut buf = [0u8; 1024];
20977        rng.fill_bytes(&mut buf);
20978        let mut unstructured = Unstructured::new(&buf);
20979        Self::arbitrary(&mut unstructured).unwrap_or_default()
20980    }
20981}
20982impl Default for MISSION_REQUEST_INT_DATA {
20983    fn default() -> Self {
20984        Self::DEFAULT.clone()
20985    }
20986}
20987impl MessageData for MISSION_REQUEST_INT_DATA {
20988    type Message = MavMessage;
20989    const ID: u32 = 51u32;
20990    const NAME: &'static str = "MISSION_REQUEST_INT";
20991    const EXTRA_CRC: u8 = 196u8;
20992    const ENCODED_LEN: usize = 5usize;
20993    fn deser(
20994        _version: MavlinkVersion,
20995        __input: &[u8],
20996    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20997        let avail_len = __input.len();
20998        let mut payload_buf = [0; Self::ENCODED_LEN];
20999        let mut buf = if avail_len < Self::ENCODED_LEN {
21000            payload_buf[0..avail_len].copy_from_slice(__input);
21001            Bytes::new(&payload_buf)
21002        } else {
21003            Bytes::new(__input)
21004        };
21005        let mut __struct = Self::default();
21006        __struct.seq = buf.get_u16_le()?;
21007        __struct.target_system = buf.get_u8()?;
21008        __struct.target_component = buf.get_u8()?;
21009        let tmp = buf.get_u8()?;
21010        __struct.mission_type =
21011            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21012                enum_type: "MavMissionType",
21013                value: tmp as u64,
21014            })?;
21015        Ok(__struct)
21016    }
21017    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21018        let mut __tmp = BytesMut::new(bytes);
21019        #[allow(clippy::absurd_extreme_comparisons)]
21020        #[allow(unused_comparisons)]
21021        if __tmp.remaining() < Self::ENCODED_LEN {
21022            panic!(
21023                "buffer is too small (need {} bytes, but got {})",
21024                Self::ENCODED_LEN,
21025                __tmp.remaining(),
21026            )
21027        }
21028        __tmp.put_u16_le(self.seq);
21029        __tmp.put_u8(self.target_system);
21030        __tmp.put_u8(self.target_component);
21031        if matches!(version, MavlinkVersion::V2) {
21032            __tmp.put_u8(self.mission_type as u8);
21033            let len = __tmp.len();
21034            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21035        } else {
21036            __tmp.len()
21037        }
21038    }
21039}
21040#[doc = "Request the overall list of mission items from the system/component."]
21041#[doc = ""]
21042#[doc = "ID: 43"]
21043#[derive(Debug, Clone, PartialEq)]
21044#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21045#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21046#[cfg_attr(feature = "ts", derive(TS))]
21047#[cfg_attr(feature = "ts", ts(export))]
21048pub struct MISSION_REQUEST_LIST_DATA {
21049    #[doc = "System ID"]
21050    pub target_system: u8,
21051    #[doc = "Component ID"]
21052    pub target_component: u8,
21053    #[doc = "Mission type."]
21054    #[cfg_attr(feature = "serde", serde(default))]
21055    pub mission_type: MavMissionType,
21056}
21057impl MISSION_REQUEST_LIST_DATA {
21058    pub const ENCODED_LEN: usize = 3usize;
21059    pub const DEFAULT: Self = Self {
21060        target_system: 0_u8,
21061        target_component: 0_u8,
21062        mission_type: MavMissionType::DEFAULT,
21063    };
21064    #[cfg(feature = "arbitrary")]
21065    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21066        use arbitrary::{Arbitrary, Unstructured};
21067        let mut buf = [0u8; 1024];
21068        rng.fill_bytes(&mut buf);
21069        let mut unstructured = Unstructured::new(&buf);
21070        Self::arbitrary(&mut unstructured).unwrap_or_default()
21071    }
21072}
21073impl Default for MISSION_REQUEST_LIST_DATA {
21074    fn default() -> Self {
21075        Self::DEFAULT.clone()
21076    }
21077}
21078impl MessageData for MISSION_REQUEST_LIST_DATA {
21079    type Message = MavMessage;
21080    const ID: u32 = 43u32;
21081    const NAME: &'static str = "MISSION_REQUEST_LIST";
21082    const EXTRA_CRC: u8 = 132u8;
21083    const ENCODED_LEN: usize = 3usize;
21084    fn deser(
21085        _version: MavlinkVersion,
21086        __input: &[u8],
21087    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21088        let avail_len = __input.len();
21089        let mut payload_buf = [0; Self::ENCODED_LEN];
21090        let mut buf = if avail_len < Self::ENCODED_LEN {
21091            payload_buf[0..avail_len].copy_from_slice(__input);
21092            Bytes::new(&payload_buf)
21093        } else {
21094            Bytes::new(__input)
21095        };
21096        let mut __struct = Self::default();
21097        __struct.target_system = buf.get_u8()?;
21098        __struct.target_component = buf.get_u8()?;
21099        let tmp = buf.get_u8()?;
21100        __struct.mission_type =
21101            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21102                enum_type: "MavMissionType",
21103                value: tmp as u64,
21104            })?;
21105        Ok(__struct)
21106    }
21107    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21108        let mut __tmp = BytesMut::new(bytes);
21109        #[allow(clippy::absurd_extreme_comparisons)]
21110        #[allow(unused_comparisons)]
21111        if __tmp.remaining() < Self::ENCODED_LEN {
21112            panic!(
21113                "buffer is too small (need {} bytes, but got {})",
21114                Self::ENCODED_LEN,
21115                __tmp.remaining(),
21116            )
21117        }
21118        __tmp.put_u8(self.target_system);
21119        __tmp.put_u8(self.target_component);
21120        if matches!(version, MavlinkVersion::V2) {
21121            __tmp.put_u8(self.mission_type as u8);
21122            let len = __tmp.len();
21123            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21124        } else {
21125            __tmp.len()
21126        }
21127    }
21128}
21129#[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
21130#[doc = ""]
21131#[doc = "ID: 37"]
21132#[derive(Debug, Clone, PartialEq)]
21133#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21134#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21135#[cfg_attr(feature = "ts", derive(TS))]
21136#[cfg_attr(feature = "ts", ts(export))]
21137pub struct MISSION_REQUEST_PARTIAL_LIST_DATA {
21138    #[doc = "Start index"]
21139    pub start_index: i16,
21140    #[doc = "End index, -1 by default (-1: send list to end). Else a valid index of the list"]
21141    pub end_index: i16,
21142    #[doc = "System ID"]
21143    pub target_system: u8,
21144    #[doc = "Component ID"]
21145    pub target_component: u8,
21146    #[doc = "Mission type."]
21147    #[cfg_attr(feature = "serde", serde(default))]
21148    pub mission_type: MavMissionType,
21149}
21150impl MISSION_REQUEST_PARTIAL_LIST_DATA {
21151    pub const ENCODED_LEN: usize = 7usize;
21152    pub const DEFAULT: Self = Self {
21153        start_index: 0_i16,
21154        end_index: 0_i16,
21155        target_system: 0_u8,
21156        target_component: 0_u8,
21157        mission_type: MavMissionType::DEFAULT,
21158    };
21159    #[cfg(feature = "arbitrary")]
21160    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21161        use arbitrary::{Arbitrary, Unstructured};
21162        let mut buf = [0u8; 1024];
21163        rng.fill_bytes(&mut buf);
21164        let mut unstructured = Unstructured::new(&buf);
21165        Self::arbitrary(&mut unstructured).unwrap_or_default()
21166    }
21167}
21168impl Default for MISSION_REQUEST_PARTIAL_LIST_DATA {
21169    fn default() -> Self {
21170        Self::DEFAULT.clone()
21171    }
21172}
21173impl MessageData for MISSION_REQUEST_PARTIAL_LIST_DATA {
21174    type Message = MavMessage;
21175    const ID: u32 = 37u32;
21176    const NAME: &'static str = "MISSION_REQUEST_PARTIAL_LIST";
21177    const EXTRA_CRC: u8 = 212u8;
21178    const ENCODED_LEN: usize = 7usize;
21179    fn deser(
21180        _version: MavlinkVersion,
21181        __input: &[u8],
21182    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21183        let avail_len = __input.len();
21184        let mut payload_buf = [0; Self::ENCODED_LEN];
21185        let mut buf = if avail_len < Self::ENCODED_LEN {
21186            payload_buf[0..avail_len].copy_from_slice(__input);
21187            Bytes::new(&payload_buf)
21188        } else {
21189            Bytes::new(__input)
21190        };
21191        let mut __struct = Self::default();
21192        __struct.start_index = buf.get_i16_le()?;
21193        __struct.end_index = buf.get_i16_le()?;
21194        __struct.target_system = buf.get_u8()?;
21195        __struct.target_component = buf.get_u8()?;
21196        let tmp = buf.get_u8()?;
21197        __struct.mission_type =
21198            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21199                enum_type: "MavMissionType",
21200                value: tmp as u64,
21201            })?;
21202        Ok(__struct)
21203    }
21204    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21205        let mut __tmp = BytesMut::new(bytes);
21206        #[allow(clippy::absurd_extreme_comparisons)]
21207        #[allow(unused_comparisons)]
21208        if __tmp.remaining() < Self::ENCODED_LEN {
21209            panic!(
21210                "buffer is too small (need {} bytes, but got {})",
21211                Self::ENCODED_LEN,
21212                __tmp.remaining(),
21213            )
21214        }
21215        __tmp.put_i16_le(self.start_index);
21216        __tmp.put_i16_le(self.end_index);
21217        __tmp.put_u8(self.target_system);
21218        __tmp.put_u8(self.target_component);
21219        if matches!(version, MavlinkVersion::V2) {
21220            __tmp.put_u8(self.mission_type as u8);
21221            let len = __tmp.len();
21222            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21223        } else {
21224            __tmp.len()
21225        }
21226    }
21227}
21228#[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
21229#[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
21230#[doc = ""]
21231#[doc = "ID: 41"]
21232#[derive(Debug, Clone, PartialEq)]
21233#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21234#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21235#[cfg_attr(feature = "ts", derive(TS))]
21236#[cfg_attr(feature = "ts", ts(export))]
21237pub struct MISSION_SET_CURRENT_DATA {
21238    #[doc = "Sequence"]
21239    pub seq: u16,
21240    #[doc = "System ID"]
21241    pub target_system: u8,
21242    #[doc = "Component ID"]
21243    pub target_component: u8,
21244}
21245impl MISSION_SET_CURRENT_DATA {
21246    pub const ENCODED_LEN: usize = 4usize;
21247    pub const DEFAULT: Self = Self {
21248        seq: 0_u16,
21249        target_system: 0_u8,
21250        target_component: 0_u8,
21251    };
21252    #[cfg(feature = "arbitrary")]
21253    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21254        use arbitrary::{Arbitrary, Unstructured};
21255        let mut buf = [0u8; 1024];
21256        rng.fill_bytes(&mut buf);
21257        let mut unstructured = Unstructured::new(&buf);
21258        Self::arbitrary(&mut unstructured).unwrap_or_default()
21259    }
21260}
21261impl Default for MISSION_SET_CURRENT_DATA {
21262    fn default() -> Self {
21263        Self::DEFAULT.clone()
21264    }
21265}
21266impl MessageData for MISSION_SET_CURRENT_DATA {
21267    type Message = MavMessage;
21268    const ID: u32 = 41u32;
21269    const NAME: &'static str = "MISSION_SET_CURRENT";
21270    const EXTRA_CRC: u8 = 28u8;
21271    const ENCODED_LEN: usize = 4usize;
21272    fn deser(
21273        _version: MavlinkVersion,
21274        __input: &[u8],
21275    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21276        let avail_len = __input.len();
21277        let mut payload_buf = [0; Self::ENCODED_LEN];
21278        let mut buf = if avail_len < Self::ENCODED_LEN {
21279            payload_buf[0..avail_len].copy_from_slice(__input);
21280            Bytes::new(&payload_buf)
21281        } else {
21282            Bytes::new(__input)
21283        };
21284        let mut __struct = Self::default();
21285        __struct.seq = buf.get_u16_le()?;
21286        __struct.target_system = buf.get_u8()?;
21287        __struct.target_component = buf.get_u8()?;
21288        Ok(__struct)
21289    }
21290    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21291        let mut __tmp = BytesMut::new(bytes);
21292        #[allow(clippy::absurd_extreme_comparisons)]
21293        #[allow(unused_comparisons)]
21294        if __tmp.remaining() < Self::ENCODED_LEN {
21295            panic!(
21296                "buffer is too small (need {} bytes, but got {})",
21297                Self::ENCODED_LEN,
21298                __tmp.remaining(),
21299            )
21300        }
21301        __tmp.put_u16_le(self.seq);
21302        __tmp.put_u8(self.target_system);
21303        __tmp.put_u8(self.target_component);
21304        if matches!(version, MavlinkVersion::V2) {
21305            let len = __tmp.len();
21306            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21307        } else {
21308            __tmp.len()
21309        }
21310    }
21311}
21312#[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
21313#[doc = ""]
21314#[doc = "ID: 38"]
21315#[derive(Debug, Clone, PartialEq)]
21316#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21317#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21318#[cfg_attr(feature = "ts", derive(TS))]
21319#[cfg_attr(feature = "ts", ts(export))]
21320pub struct MISSION_WRITE_PARTIAL_LIST_DATA {
21321    #[doc = "Start index. Must be smaller / equal to the largest index of the current onboard list."]
21322    pub start_index: i16,
21323    #[doc = "End index, equal or greater than start index."]
21324    pub end_index: i16,
21325    #[doc = "System ID"]
21326    pub target_system: u8,
21327    #[doc = "Component ID"]
21328    pub target_component: u8,
21329    #[doc = "Mission type."]
21330    #[cfg_attr(feature = "serde", serde(default))]
21331    pub mission_type: MavMissionType,
21332}
21333impl MISSION_WRITE_PARTIAL_LIST_DATA {
21334    pub const ENCODED_LEN: usize = 7usize;
21335    pub const DEFAULT: Self = Self {
21336        start_index: 0_i16,
21337        end_index: 0_i16,
21338        target_system: 0_u8,
21339        target_component: 0_u8,
21340        mission_type: MavMissionType::DEFAULT,
21341    };
21342    #[cfg(feature = "arbitrary")]
21343    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21344        use arbitrary::{Arbitrary, Unstructured};
21345        let mut buf = [0u8; 1024];
21346        rng.fill_bytes(&mut buf);
21347        let mut unstructured = Unstructured::new(&buf);
21348        Self::arbitrary(&mut unstructured).unwrap_or_default()
21349    }
21350}
21351impl Default for MISSION_WRITE_PARTIAL_LIST_DATA {
21352    fn default() -> Self {
21353        Self::DEFAULT.clone()
21354    }
21355}
21356impl MessageData for MISSION_WRITE_PARTIAL_LIST_DATA {
21357    type Message = MavMessage;
21358    const ID: u32 = 38u32;
21359    const NAME: &'static str = "MISSION_WRITE_PARTIAL_LIST";
21360    const EXTRA_CRC: u8 = 9u8;
21361    const ENCODED_LEN: usize = 7usize;
21362    fn deser(
21363        _version: MavlinkVersion,
21364        __input: &[u8],
21365    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21366        let avail_len = __input.len();
21367        let mut payload_buf = [0; Self::ENCODED_LEN];
21368        let mut buf = if avail_len < Self::ENCODED_LEN {
21369            payload_buf[0..avail_len].copy_from_slice(__input);
21370            Bytes::new(&payload_buf)
21371        } else {
21372            Bytes::new(__input)
21373        };
21374        let mut __struct = Self::default();
21375        __struct.start_index = buf.get_i16_le()?;
21376        __struct.end_index = buf.get_i16_le()?;
21377        __struct.target_system = buf.get_u8()?;
21378        __struct.target_component = buf.get_u8()?;
21379        let tmp = buf.get_u8()?;
21380        __struct.mission_type =
21381            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21382                enum_type: "MavMissionType",
21383                value: tmp as u64,
21384            })?;
21385        Ok(__struct)
21386    }
21387    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21388        let mut __tmp = BytesMut::new(bytes);
21389        #[allow(clippy::absurd_extreme_comparisons)]
21390        #[allow(unused_comparisons)]
21391        if __tmp.remaining() < Self::ENCODED_LEN {
21392            panic!(
21393                "buffer is too small (need {} bytes, but got {})",
21394                Self::ENCODED_LEN,
21395                __tmp.remaining(),
21396            )
21397        }
21398        __tmp.put_i16_le(self.start_index);
21399        __tmp.put_i16_le(self.end_index);
21400        __tmp.put_u8(self.target_system);
21401        __tmp.put_u8(self.target_component);
21402        if matches!(version, MavlinkVersion::V2) {
21403            __tmp.put_u8(self.mission_type as u8);
21404            let len = __tmp.len();
21405            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21406        } else {
21407            __tmp.len()
21408        }
21409    }
21410}
21411#[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
21412#[doc = "Orientation of a mount."]
21413#[doc = ""]
21414#[doc = "ID: 265"]
21415#[derive(Debug, Clone, PartialEq)]
21416#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21417#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21418#[cfg_attr(feature = "ts", derive(TS))]
21419#[cfg_attr(feature = "ts", ts(export))]
21420pub struct MOUNT_ORIENTATION_DATA {
21421    #[doc = "Timestamp (time since system boot)."]
21422    pub time_boot_ms: u32,
21423    #[doc = "Roll in global frame (set to NaN for invalid)."]
21424    pub roll: f32,
21425    #[doc = "Pitch in global frame (set to NaN for invalid)."]
21426    pub pitch: f32,
21427    #[doc = "Yaw relative to vehicle (set to NaN for invalid)."]
21428    pub yaw: f32,
21429    #[doc = "Yaw in absolute frame relative to Earth's North, north is 0 (set to NaN for invalid)."]
21430    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21431    pub yaw_absolute: f32,
21432}
21433impl MOUNT_ORIENTATION_DATA {
21434    pub const ENCODED_LEN: usize = 20usize;
21435    pub const DEFAULT: Self = Self {
21436        time_boot_ms: 0_u32,
21437        roll: 0.0_f32,
21438        pitch: 0.0_f32,
21439        yaw: 0.0_f32,
21440        yaw_absolute: 0.0_f32,
21441    };
21442    #[cfg(feature = "arbitrary")]
21443    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21444        use arbitrary::{Arbitrary, Unstructured};
21445        let mut buf = [0u8; 1024];
21446        rng.fill_bytes(&mut buf);
21447        let mut unstructured = Unstructured::new(&buf);
21448        Self::arbitrary(&mut unstructured).unwrap_or_default()
21449    }
21450}
21451impl Default for MOUNT_ORIENTATION_DATA {
21452    fn default() -> Self {
21453        Self::DEFAULT.clone()
21454    }
21455}
21456impl MessageData for MOUNT_ORIENTATION_DATA {
21457    type Message = MavMessage;
21458    const ID: u32 = 265u32;
21459    const NAME: &'static str = "MOUNT_ORIENTATION";
21460    const EXTRA_CRC: u8 = 26u8;
21461    const ENCODED_LEN: usize = 20usize;
21462    fn deser(
21463        _version: MavlinkVersion,
21464        __input: &[u8],
21465    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21466        let avail_len = __input.len();
21467        let mut payload_buf = [0; Self::ENCODED_LEN];
21468        let mut buf = if avail_len < Self::ENCODED_LEN {
21469            payload_buf[0..avail_len].copy_from_slice(__input);
21470            Bytes::new(&payload_buf)
21471        } else {
21472            Bytes::new(__input)
21473        };
21474        let mut __struct = Self::default();
21475        __struct.time_boot_ms = buf.get_u32_le()?;
21476        __struct.roll = buf.get_f32_le()?;
21477        __struct.pitch = buf.get_f32_le()?;
21478        __struct.yaw = buf.get_f32_le()?;
21479        __struct.yaw_absolute = buf.get_f32_le()?;
21480        Ok(__struct)
21481    }
21482    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21483        let mut __tmp = BytesMut::new(bytes);
21484        #[allow(clippy::absurd_extreme_comparisons)]
21485        #[allow(unused_comparisons)]
21486        if __tmp.remaining() < Self::ENCODED_LEN {
21487            panic!(
21488                "buffer is too small (need {} bytes, but got {})",
21489                Self::ENCODED_LEN,
21490                __tmp.remaining(),
21491            )
21492        }
21493        __tmp.put_u32_le(self.time_boot_ms);
21494        __tmp.put_f32_le(self.roll);
21495        __tmp.put_f32_le(self.pitch);
21496        __tmp.put_f32_le(self.yaw);
21497        if matches!(version, MavlinkVersion::V2) {
21498            __tmp.put_f32_le(self.yaw_absolute);
21499            let len = __tmp.len();
21500            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21501        } else {
21502            __tmp.len()
21503        }
21504    }
21505}
21506#[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
21507#[doc = ""]
21508#[doc = "ID: 251"]
21509#[derive(Debug, Clone, PartialEq)]
21510#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21511#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21512#[cfg_attr(feature = "ts", derive(TS))]
21513#[cfg_attr(feature = "ts", ts(export))]
21514pub struct NAMED_VALUE_FLOAT_DATA {
21515    #[doc = "Timestamp (time since system boot)."]
21516    pub time_boot_ms: u32,
21517    #[doc = "Floating point value"]
21518    pub value: f32,
21519    #[doc = "Name of the debug variable"]
21520    #[cfg_attr(feature = "ts", ts(type = "string"))]
21521    pub name: CharArray<10>,
21522}
21523impl NAMED_VALUE_FLOAT_DATA {
21524    pub const ENCODED_LEN: usize = 18usize;
21525    pub const DEFAULT: Self = Self {
21526        time_boot_ms: 0_u32,
21527        value: 0.0_f32,
21528        name: CharArray::new([0_u8; 10usize]),
21529    };
21530    #[cfg(feature = "arbitrary")]
21531    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21532        use arbitrary::{Arbitrary, Unstructured};
21533        let mut buf = [0u8; 1024];
21534        rng.fill_bytes(&mut buf);
21535        let mut unstructured = Unstructured::new(&buf);
21536        Self::arbitrary(&mut unstructured).unwrap_or_default()
21537    }
21538}
21539impl Default for NAMED_VALUE_FLOAT_DATA {
21540    fn default() -> Self {
21541        Self::DEFAULT.clone()
21542    }
21543}
21544impl MessageData for NAMED_VALUE_FLOAT_DATA {
21545    type Message = MavMessage;
21546    const ID: u32 = 251u32;
21547    const NAME: &'static str = "NAMED_VALUE_FLOAT";
21548    const EXTRA_CRC: u8 = 170u8;
21549    const ENCODED_LEN: usize = 18usize;
21550    fn deser(
21551        _version: MavlinkVersion,
21552        __input: &[u8],
21553    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21554        let avail_len = __input.len();
21555        let mut payload_buf = [0; Self::ENCODED_LEN];
21556        let mut buf = if avail_len < Self::ENCODED_LEN {
21557            payload_buf[0..avail_len].copy_from_slice(__input);
21558            Bytes::new(&payload_buf)
21559        } else {
21560            Bytes::new(__input)
21561        };
21562        let mut __struct = Self::default();
21563        __struct.time_boot_ms = buf.get_u32_le()?;
21564        __struct.value = buf.get_f32_le()?;
21565        let mut tmp = [0_u8; 10usize];
21566        for v in &mut tmp {
21567            *v = buf.get_u8()?;
21568        }
21569        __struct.name = CharArray::new(tmp);
21570        Ok(__struct)
21571    }
21572    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21573        let mut __tmp = BytesMut::new(bytes);
21574        #[allow(clippy::absurd_extreme_comparisons)]
21575        #[allow(unused_comparisons)]
21576        if __tmp.remaining() < Self::ENCODED_LEN {
21577            panic!(
21578                "buffer is too small (need {} bytes, but got {})",
21579                Self::ENCODED_LEN,
21580                __tmp.remaining(),
21581            )
21582        }
21583        __tmp.put_u32_le(self.time_boot_ms);
21584        __tmp.put_f32_le(self.value);
21585        for val in &self.name {
21586            __tmp.put_u8(*val);
21587        }
21588        if matches!(version, MavlinkVersion::V2) {
21589            let len = __tmp.len();
21590            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21591        } else {
21592            __tmp.len()
21593        }
21594    }
21595}
21596#[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
21597#[doc = ""]
21598#[doc = "ID: 252"]
21599#[derive(Debug, Clone, PartialEq)]
21600#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21601#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21602#[cfg_attr(feature = "ts", derive(TS))]
21603#[cfg_attr(feature = "ts", ts(export))]
21604pub struct NAMED_VALUE_INT_DATA {
21605    #[doc = "Timestamp (time since system boot)."]
21606    pub time_boot_ms: u32,
21607    #[doc = "Signed integer value"]
21608    pub value: i32,
21609    #[doc = "Name of the debug variable"]
21610    #[cfg_attr(feature = "ts", ts(type = "string"))]
21611    pub name: CharArray<10>,
21612}
21613impl NAMED_VALUE_INT_DATA {
21614    pub const ENCODED_LEN: usize = 18usize;
21615    pub const DEFAULT: Self = Self {
21616        time_boot_ms: 0_u32,
21617        value: 0_i32,
21618        name: CharArray::new([0_u8; 10usize]),
21619    };
21620    #[cfg(feature = "arbitrary")]
21621    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21622        use arbitrary::{Arbitrary, Unstructured};
21623        let mut buf = [0u8; 1024];
21624        rng.fill_bytes(&mut buf);
21625        let mut unstructured = Unstructured::new(&buf);
21626        Self::arbitrary(&mut unstructured).unwrap_or_default()
21627    }
21628}
21629impl Default for NAMED_VALUE_INT_DATA {
21630    fn default() -> Self {
21631        Self::DEFAULT.clone()
21632    }
21633}
21634impl MessageData for NAMED_VALUE_INT_DATA {
21635    type Message = MavMessage;
21636    const ID: u32 = 252u32;
21637    const NAME: &'static str = "NAMED_VALUE_INT";
21638    const EXTRA_CRC: u8 = 44u8;
21639    const ENCODED_LEN: usize = 18usize;
21640    fn deser(
21641        _version: MavlinkVersion,
21642        __input: &[u8],
21643    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21644        let avail_len = __input.len();
21645        let mut payload_buf = [0; Self::ENCODED_LEN];
21646        let mut buf = if avail_len < Self::ENCODED_LEN {
21647            payload_buf[0..avail_len].copy_from_slice(__input);
21648            Bytes::new(&payload_buf)
21649        } else {
21650            Bytes::new(__input)
21651        };
21652        let mut __struct = Self::default();
21653        __struct.time_boot_ms = buf.get_u32_le()?;
21654        __struct.value = buf.get_i32_le()?;
21655        let mut tmp = [0_u8; 10usize];
21656        for v in &mut tmp {
21657            *v = buf.get_u8()?;
21658        }
21659        __struct.name = CharArray::new(tmp);
21660        Ok(__struct)
21661    }
21662    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21663        let mut __tmp = BytesMut::new(bytes);
21664        #[allow(clippy::absurd_extreme_comparisons)]
21665        #[allow(unused_comparisons)]
21666        if __tmp.remaining() < Self::ENCODED_LEN {
21667            panic!(
21668                "buffer is too small (need {} bytes, but got {})",
21669                Self::ENCODED_LEN,
21670                __tmp.remaining(),
21671            )
21672        }
21673        __tmp.put_u32_le(self.time_boot_ms);
21674        __tmp.put_i32_le(self.value);
21675        for val in &self.name {
21676            __tmp.put_u8(*val);
21677        }
21678        if matches!(version, MavlinkVersion::V2) {
21679            let len = __tmp.len();
21680            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21681        } else {
21682            __tmp.len()
21683        }
21684    }
21685}
21686#[doc = "The state of the navigation and position controller."]
21687#[doc = ""]
21688#[doc = "ID: 62"]
21689#[derive(Debug, Clone, PartialEq)]
21690#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21691#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21692#[cfg_attr(feature = "ts", derive(TS))]
21693#[cfg_attr(feature = "ts", ts(export))]
21694pub struct NAV_CONTROLLER_OUTPUT_DATA {
21695    #[doc = "Current desired roll"]
21696    pub nav_roll: f32,
21697    #[doc = "Current desired pitch"]
21698    pub nav_pitch: f32,
21699    #[doc = "Current altitude error"]
21700    pub alt_error: f32,
21701    #[doc = "Current airspeed error"]
21702    pub aspd_error: f32,
21703    #[doc = "Current crosstrack error on x-y plane"]
21704    pub xtrack_error: f32,
21705    #[doc = "Current desired heading"]
21706    pub nav_bearing: i16,
21707    #[doc = "Bearing to current waypoint/target"]
21708    pub target_bearing: i16,
21709    #[doc = "Distance to active waypoint"]
21710    pub wp_dist: u16,
21711}
21712impl NAV_CONTROLLER_OUTPUT_DATA {
21713    pub const ENCODED_LEN: usize = 26usize;
21714    pub const DEFAULT: Self = Self {
21715        nav_roll: 0.0_f32,
21716        nav_pitch: 0.0_f32,
21717        alt_error: 0.0_f32,
21718        aspd_error: 0.0_f32,
21719        xtrack_error: 0.0_f32,
21720        nav_bearing: 0_i16,
21721        target_bearing: 0_i16,
21722        wp_dist: 0_u16,
21723    };
21724    #[cfg(feature = "arbitrary")]
21725    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21726        use arbitrary::{Arbitrary, Unstructured};
21727        let mut buf = [0u8; 1024];
21728        rng.fill_bytes(&mut buf);
21729        let mut unstructured = Unstructured::new(&buf);
21730        Self::arbitrary(&mut unstructured).unwrap_or_default()
21731    }
21732}
21733impl Default for NAV_CONTROLLER_OUTPUT_DATA {
21734    fn default() -> Self {
21735        Self::DEFAULT.clone()
21736    }
21737}
21738impl MessageData for NAV_CONTROLLER_OUTPUT_DATA {
21739    type Message = MavMessage;
21740    const ID: u32 = 62u32;
21741    const NAME: &'static str = "NAV_CONTROLLER_OUTPUT";
21742    const EXTRA_CRC: u8 = 183u8;
21743    const ENCODED_LEN: usize = 26usize;
21744    fn deser(
21745        _version: MavlinkVersion,
21746        __input: &[u8],
21747    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21748        let avail_len = __input.len();
21749        let mut payload_buf = [0; Self::ENCODED_LEN];
21750        let mut buf = if avail_len < Self::ENCODED_LEN {
21751            payload_buf[0..avail_len].copy_from_slice(__input);
21752            Bytes::new(&payload_buf)
21753        } else {
21754            Bytes::new(__input)
21755        };
21756        let mut __struct = Self::default();
21757        __struct.nav_roll = buf.get_f32_le()?;
21758        __struct.nav_pitch = buf.get_f32_le()?;
21759        __struct.alt_error = buf.get_f32_le()?;
21760        __struct.aspd_error = buf.get_f32_le()?;
21761        __struct.xtrack_error = buf.get_f32_le()?;
21762        __struct.nav_bearing = buf.get_i16_le()?;
21763        __struct.target_bearing = buf.get_i16_le()?;
21764        __struct.wp_dist = buf.get_u16_le()?;
21765        Ok(__struct)
21766    }
21767    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21768        let mut __tmp = BytesMut::new(bytes);
21769        #[allow(clippy::absurd_extreme_comparisons)]
21770        #[allow(unused_comparisons)]
21771        if __tmp.remaining() < Self::ENCODED_LEN {
21772            panic!(
21773                "buffer is too small (need {} bytes, but got {})",
21774                Self::ENCODED_LEN,
21775                __tmp.remaining(),
21776            )
21777        }
21778        __tmp.put_f32_le(self.nav_roll);
21779        __tmp.put_f32_le(self.nav_pitch);
21780        __tmp.put_f32_le(self.alt_error);
21781        __tmp.put_f32_le(self.aspd_error);
21782        __tmp.put_f32_le(self.xtrack_error);
21783        __tmp.put_i16_le(self.nav_bearing);
21784        __tmp.put_i16_le(self.target_bearing);
21785        __tmp.put_u16_le(self.wp_dist);
21786        if matches!(version, MavlinkVersion::V2) {
21787            let len = __tmp.len();
21788            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21789        } else {
21790            __tmp.len()
21791        }
21792    }
21793}
21794#[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
21795#[doc = ""]
21796#[doc = "ID: 330"]
21797#[derive(Debug, Clone, PartialEq)]
21798#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21799#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21800#[cfg_attr(feature = "ts", derive(TS))]
21801#[cfg_attr(feature = "ts", ts(export))]
21802pub struct OBSTACLE_DISTANCE_DATA {
21803    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21804    pub time_usec: u64,
21805    #[doc = "Distance of obstacles around the vehicle with index 0 corresponding to north + angle_offset, unless otherwise specified in the frame. A value of 0 is valid and means that the obstacle is practically touching the sensor. A value of max_distance +1 means no obstacle is present. A value of UINT16_MAX for unknown/not used. In a array element, one unit corresponds to 1cm."]
21806    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21807    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21808    pub distances: [u16; 72],
21809    #[doc = "Minimum distance the sensor can measure."]
21810    pub min_distance: u16,
21811    #[doc = "Maximum distance the sensor can measure."]
21812    pub max_distance: u16,
21813    #[doc = "Class id of the distance sensor type."]
21814    pub sensor_type: MavDistanceSensor,
21815    #[doc = "Angular width in degrees of each array element. Increment direction is clockwise. This field is ignored if increment_f is non-zero."]
21816    pub increment: u8,
21817    #[doc = "Angular width in degrees of each array element as a float. If non-zero then this value is used instead of the uint8_t increment field. Positive is clockwise direction, negative is counter-clockwise."]
21818    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21819    pub increment_f: f32,
21820    #[doc = "Relative angle offset of the 0-index element in the distances array. Value of 0 corresponds to forward. Positive is clockwise direction, negative is counter-clockwise."]
21821    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21822    pub angle_offset: f32,
21823    #[doc = "Coordinate frame of reference for the yaw rotation and offset of the sensor data. Defaults to MAV_FRAME_GLOBAL, which is north aligned. For body-mounted sensors use MAV_FRAME_BODY_FRD, which is vehicle front aligned."]
21824    #[cfg_attr(feature = "serde", serde(default))]
21825    pub frame: MavFrame,
21826}
21827impl OBSTACLE_DISTANCE_DATA {
21828    pub const ENCODED_LEN: usize = 167usize;
21829    pub const DEFAULT: Self = Self {
21830        time_usec: 0_u64,
21831        distances: [0_u16; 72usize],
21832        min_distance: 0_u16,
21833        max_distance: 0_u16,
21834        sensor_type: MavDistanceSensor::DEFAULT,
21835        increment: 0_u8,
21836        increment_f: 0.0_f32,
21837        angle_offset: 0.0_f32,
21838        frame: MavFrame::DEFAULT,
21839    };
21840    #[cfg(feature = "arbitrary")]
21841    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21842        use arbitrary::{Arbitrary, Unstructured};
21843        let mut buf = [0u8; 1024];
21844        rng.fill_bytes(&mut buf);
21845        let mut unstructured = Unstructured::new(&buf);
21846        Self::arbitrary(&mut unstructured).unwrap_or_default()
21847    }
21848}
21849impl Default for OBSTACLE_DISTANCE_DATA {
21850    fn default() -> Self {
21851        Self::DEFAULT.clone()
21852    }
21853}
21854impl MessageData for OBSTACLE_DISTANCE_DATA {
21855    type Message = MavMessage;
21856    const ID: u32 = 330u32;
21857    const NAME: &'static str = "OBSTACLE_DISTANCE";
21858    const EXTRA_CRC: u8 = 23u8;
21859    const ENCODED_LEN: usize = 167usize;
21860    fn deser(
21861        _version: MavlinkVersion,
21862        __input: &[u8],
21863    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21864        let avail_len = __input.len();
21865        let mut payload_buf = [0; Self::ENCODED_LEN];
21866        let mut buf = if avail_len < Self::ENCODED_LEN {
21867            payload_buf[0..avail_len].copy_from_slice(__input);
21868            Bytes::new(&payload_buf)
21869        } else {
21870            Bytes::new(__input)
21871        };
21872        let mut __struct = Self::default();
21873        __struct.time_usec = buf.get_u64_le()?;
21874        for v in &mut __struct.distances {
21875            let val = buf.get_u16_le()?;
21876            *v = val;
21877        }
21878        __struct.min_distance = buf.get_u16_le()?;
21879        __struct.max_distance = buf.get_u16_le()?;
21880        let tmp = buf.get_u8()?;
21881        __struct.sensor_type =
21882            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21883                enum_type: "MavDistanceSensor",
21884                value: tmp as u64,
21885            })?;
21886        __struct.increment = buf.get_u8()?;
21887        __struct.increment_f = buf.get_f32_le()?;
21888        __struct.angle_offset = buf.get_f32_le()?;
21889        let tmp = buf.get_u8()?;
21890        __struct.frame =
21891            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21892                enum_type: "MavFrame",
21893                value: tmp as u64,
21894            })?;
21895        Ok(__struct)
21896    }
21897    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21898        let mut __tmp = BytesMut::new(bytes);
21899        #[allow(clippy::absurd_extreme_comparisons)]
21900        #[allow(unused_comparisons)]
21901        if __tmp.remaining() < Self::ENCODED_LEN {
21902            panic!(
21903                "buffer is too small (need {} bytes, but got {})",
21904                Self::ENCODED_LEN,
21905                __tmp.remaining(),
21906            )
21907        }
21908        __tmp.put_u64_le(self.time_usec);
21909        for val in &self.distances {
21910            __tmp.put_u16_le(*val);
21911        }
21912        __tmp.put_u16_le(self.min_distance);
21913        __tmp.put_u16_le(self.max_distance);
21914        __tmp.put_u8(self.sensor_type as u8);
21915        __tmp.put_u8(self.increment);
21916        if matches!(version, MavlinkVersion::V2) {
21917            __tmp.put_f32_le(self.increment_f);
21918            __tmp.put_f32_le(self.angle_offset);
21919            __tmp.put_u8(self.frame as u8);
21920            let len = __tmp.len();
21921            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21922        } else {
21923            __tmp.len()
21924        }
21925    }
21926}
21927#[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
21928#[doc = ""]
21929#[doc = "ID: 331"]
21930#[derive(Debug, Clone, PartialEq)]
21931#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21932#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21933#[cfg_attr(feature = "ts", derive(TS))]
21934#[cfg_attr(feature = "ts", ts(export))]
21935pub struct ODOMETRY_DATA {
21936    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21937    pub time_usec: u64,
21938    #[doc = "X Position"]
21939    pub x: f32,
21940    #[doc = "Y Position"]
21941    pub y: f32,
21942    #[doc = "Z Position"]
21943    pub z: f32,
21944    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
21945    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21946    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21947    pub q: [f32; 4],
21948    #[doc = "X linear speed"]
21949    pub vx: f32,
21950    #[doc = "Y linear speed"]
21951    pub vy: f32,
21952    #[doc = "Z linear speed"]
21953    pub vz: f32,
21954    #[doc = "Roll angular speed"]
21955    pub rollspeed: f32,
21956    #[doc = "Pitch angular speed"]
21957    pub pitchspeed: f32,
21958    #[doc = "Yaw angular speed"]
21959    pub yawspeed: f32,
21960    #[doc = "Row-major representation of a 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
21961    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21962    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21963    pub pose_covariance: [f32; 21],
21964    #[doc = "Row-major representation of a 6x6 velocity cross-covariance matrix upper right triangle (states: vx, vy, vz, rollspeed, pitchspeed, yawspeed; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
21965    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21966    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
21967    pub velocity_covariance: [f32; 21],
21968    #[doc = "Coordinate frame of reference for the pose data."]
21969    pub frame_id: MavFrame,
21970    #[doc = "Coordinate frame of reference for the velocity in free space (twist) data."]
21971    pub child_frame_id: MavFrame,
21972    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
21973    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21974    pub reset_counter: u8,
21975    #[doc = "Type of estimator that is providing the odometry."]
21976    #[cfg_attr(feature = "serde", serde(default))]
21977    pub estimator_type: MavEstimatorType,
21978    #[doc = "Optional odometry quality metric as a percentage. -1 = odometry has failed, 0 = unknown/unset quality, 1 = worst quality, 100 = best quality"]
21979    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21980    pub quality: i8,
21981}
21982impl ODOMETRY_DATA {
21983    pub const ENCODED_LEN: usize = 233usize;
21984    pub const DEFAULT: Self = Self {
21985        time_usec: 0_u64,
21986        x: 0.0_f32,
21987        y: 0.0_f32,
21988        z: 0.0_f32,
21989        q: [0.0_f32; 4usize],
21990        vx: 0.0_f32,
21991        vy: 0.0_f32,
21992        vz: 0.0_f32,
21993        rollspeed: 0.0_f32,
21994        pitchspeed: 0.0_f32,
21995        yawspeed: 0.0_f32,
21996        pose_covariance: [0.0_f32; 21usize],
21997        velocity_covariance: [0.0_f32; 21usize],
21998        frame_id: MavFrame::DEFAULT,
21999        child_frame_id: MavFrame::DEFAULT,
22000        reset_counter: 0_u8,
22001        estimator_type: MavEstimatorType::DEFAULT,
22002        quality: 0_i8,
22003    };
22004    #[cfg(feature = "arbitrary")]
22005    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22006        use arbitrary::{Arbitrary, Unstructured};
22007        let mut buf = [0u8; 1024];
22008        rng.fill_bytes(&mut buf);
22009        let mut unstructured = Unstructured::new(&buf);
22010        Self::arbitrary(&mut unstructured).unwrap_or_default()
22011    }
22012}
22013impl Default for ODOMETRY_DATA {
22014    fn default() -> Self {
22015        Self::DEFAULT.clone()
22016    }
22017}
22018impl MessageData for ODOMETRY_DATA {
22019    type Message = MavMessage;
22020    const ID: u32 = 331u32;
22021    const NAME: &'static str = "ODOMETRY";
22022    const EXTRA_CRC: u8 = 91u8;
22023    const ENCODED_LEN: usize = 233usize;
22024    fn deser(
22025        _version: MavlinkVersion,
22026        __input: &[u8],
22027    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22028        let avail_len = __input.len();
22029        let mut payload_buf = [0; Self::ENCODED_LEN];
22030        let mut buf = if avail_len < Self::ENCODED_LEN {
22031            payload_buf[0..avail_len].copy_from_slice(__input);
22032            Bytes::new(&payload_buf)
22033        } else {
22034            Bytes::new(__input)
22035        };
22036        let mut __struct = Self::default();
22037        __struct.time_usec = buf.get_u64_le()?;
22038        __struct.x = buf.get_f32_le()?;
22039        __struct.y = buf.get_f32_le()?;
22040        __struct.z = buf.get_f32_le()?;
22041        for v in &mut __struct.q {
22042            let val = buf.get_f32_le()?;
22043            *v = val;
22044        }
22045        __struct.vx = buf.get_f32_le()?;
22046        __struct.vy = buf.get_f32_le()?;
22047        __struct.vz = buf.get_f32_le()?;
22048        __struct.rollspeed = buf.get_f32_le()?;
22049        __struct.pitchspeed = buf.get_f32_le()?;
22050        __struct.yawspeed = buf.get_f32_le()?;
22051        for v in &mut __struct.pose_covariance {
22052            let val = buf.get_f32_le()?;
22053            *v = val;
22054        }
22055        for v in &mut __struct.velocity_covariance {
22056            let val = buf.get_f32_le()?;
22057            *v = val;
22058        }
22059        let tmp = buf.get_u8()?;
22060        __struct.frame_id =
22061            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22062                enum_type: "MavFrame",
22063                value: tmp as u64,
22064            })?;
22065        let tmp = buf.get_u8()?;
22066        __struct.child_frame_id =
22067            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22068                enum_type: "MavFrame",
22069                value: tmp as u64,
22070            })?;
22071        __struct.reset_counter = buf.get_u8()?;
22072        let tmp = buf.get_u8()?;
22073        __struct.estimator_type =
22074            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22075                enum_type: "MavEstimatorType",
22076                value: tmp as u64,
22077            })?;
22078        __struct.quality = buf.get_i8()?;
22079        Ok(__struct)
22080    }
22081    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22082        let mut __tmp = BytesMut::new(bytes);
22083        #[allow(clippy::absurd_extreme_comparisons)]
22084        #[allow(unused_comparisons)]
22085        if __tmp.remaining() < Self::ENCODED_LEN {
22086            panic!(
22087                "buffer is too small (need {} bytes, but got {})",
22088                Self::ENCODED_LEN,
22089                __tmp.remaining(),
22090            )
22091        }
22092        __tmp.put_u64_le(self.time_usec);
22093        __tmp.put_f32_le(self.x);
22094        __tmp.put_f32_le(self.y);
22095        __tmp.put_f32_le(self.z);
22096        for val in &self.q {
22097            __tmp.put_f32_le(*val);
22098        }
22099        __tmp.put_f32_le(self.vx);
22100        __tmp.put_f32_le(self.vy);
22101        __tmp.put_f32_le(self.vz);
22102        __tmp.put_f32_le(self.rollspeed);
22103        __tmp.put_f32_le(self.pitchspeed);
22104        __tmp.put_f32_le(self.yawspeed);
22105        for val in &self.pose_covariance {
22106            __tmp.put_f32_le(*val);
22107        }
22108        for val in &self.velocity_covariance {
22109            __tmp.put_f32_le(*val);
22110        }
22111        __tmp.put_u8(self.frame_id as u8);
22112        __tmp.put_u8(self.child_frame_id as u8);
22113        if matches!(version, MavlinkVersion::V2) {
22114            __tmp.put_u8(self.reset_counter);
22115            __tmp.put_u8(self.estimator_type as u8);
22116            __tmp.put_i8(self.quality);
22117            let len = __tmp.len();
22118            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22119        } else {
22120            __tmp.len()
22121        }
22122    }
22123}
22124#[doc = "Hardware status sent by an onboard computer."]
22125#[doc = ""]
22126#[doc = "ID: 390"]
22127#[derive(Debug, Clone, PartialEq)]
22128#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22129#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22130#[cfg_attr(feature = "ts", derive(TS))]
22131#[cfg_attr(feature = "ts", ts(export))]
22132pub struct ONBOARD_COMPUTER_STATUS_DATA {
22133    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22134    pub time_usec: u64,
22135    #[doc = "Time since system boot."]
22136    pub uptime: u32,
22137    #[doc = "Amount of used RAM on the component system. A value of UINT32_MAX implies the field is unused."]
22138    pub ram_usage: u32,
22139    #[doc = "Total amount of RAM on the component system. A value of UINT32_MAX implies the field is unused."]
22140    pub ram_total: u32,
22141    #[doc = "Storage type: 0: HDD, 1: SSD, 2: EMMC, 3: SD card (non-removable), 4: SD card (removable). A value of UINT32_MAX implies the field is unused."]
22142    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22143    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22144    pub storage_type: [u32; 4],
22145    #[doc = "Amount of used storage space on the component system. A value of UINT32_MAX implies the field is unused."]
22146    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22147    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22148    pub storage_usage: [u32; 4],
22149    #[doc = "Total amount of storage space on the component system. A value of UINT32_MAX implies the field is unused."]
22150    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22151    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22152    pub storage_total: [u32; 4],
22153    #[doc = "Link type: 0-9: UART, 10-19: Wired network, 20-29: Wifi, 30-39: Point-to-point proprietary, 40-49: Mesh proprietary"]
22154    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22155    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22156    pub link_type: [u32; 6],
22157    #[doc = "Network traffic from the component system. A value of UINT32_MAX implies the field is unused."]
22158    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22159    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22160    pub link_tx_rate: [u32; 6],
22161    #[doc = "Network traffic to the component system. A value of UINT32_MAX implies the field is unused."]
22162    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22163    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22164    pub link_rx_rate: [u32; 6],
22165    #[doc = "Network capacity from the component system. A value of UINT32_MAX implies the field is unused."]
22166    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22167    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22168    pub link_tx_max: [u32; 6],
22169    #[doc = "Network capacity to the component system. A value of UINT32_MAX implies the field is unused."]
22170    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22171    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22172    pub link_rx_max: [u32; 6],
22173    #[doc = "Fan speeds. A value of INT16_MAX implies the field is unused."]
22174    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22175    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22176    pub fan_speed: [i16; 4],
22177    #[doc = "Type of the onboard computer: 0: Mission computer primary, 1: Mission computer backup 1, 2: Mission computer backup 2, 3: Compute node, 4-5: Compute spares, 6-9: Payload computers."]
22178    pub mavtype: u8,
22179    #[doc = "CPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
22180    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22181    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22182    pub cpu_cores: [u8; 8],
22183    #[doc = "Combined CPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
22184    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22185    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22186    pub cpu_combined: [u8; 10],
22187    #[doc = "GPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
22188    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22189    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22190    pub gpu_cores: [u8; 4],
22191    #[doc = "Combined GPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
22192    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22193    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22194    pub gpu_combined: [u8; 10],
22195    #[doc = "Temperature of the board. A value of INT8_MAX implies the field is unused."]
22196    pub temperature_board: i8,
22197    #[doc = "Temperature of the CPU core. A value of INT8_MAX implies the field is unused."]
22198    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22199    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22200    pub temperature_core: [i8; 8],
22201}
22202impl ONBOARD_COMPUTER_STATUS_DATA {
22203    pub const ENCODED_LEN: usize = 238usize;
22204    pub const DEFAULT: Self = Self {
22205        time_usec: 0_u64,
22206        uptime: 0_u32,
22207        ram_usage: 0_u32,
22208        ram_total: 0_u32,
22209        storage_type: [0_u32; 4usize],
22210        storage_usage: [0_u32; 4usize],
22211        storage_total: [0_u32; 4usize],
22212        link_type: [0_u32; 6usize],
22213        link_tx_rate: [0_u32; 6usize],
22214        link_rx_rate: [0_u32; 6usize],
22215        link_tx_max: [0_u32; 6usize],
22216        link_rx_max: [0_u32; 6usize],
22217        fan_speed: [0_i16; 4usize],
22218        mavtype: 0_u8,
22219        cpu_cores: [0_u8; 8usize],
22220        cpu_combined: [0_u8; 10usize],
22221        gpu_cores: [0_u8; 4usize],
22222        gpu_combined: [0_u8; 10usize],
22223        temperature_board: 0_i8,
22224        temperature_core: [0_i8; 8usize],
22225    };
22226    #[cfg(feature = "arbitrary")]
22227    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22228        use arbitrary::{Arbitrary, Unstructured};
22229        let mut buf = [0u8; 1024];
22230        rng.fill_bytes(&mut buf);
22231        let mut unstructured = Unstructured::new(&buf);
22232        Self::arbitrary(&mut unstructured).unwrap_or_default()
22233    }
22234}
22235impl Default for ONBOARD_COMPUTER_STATUS_DATA {
22236    fn default() -> Self {
22237        Self::DEFAULT.clone()
22238    }
22239}
22240impl MessageData for ONBOARD_COMPUTER_STATUS_DATA {
22241    type Message = MavMessage;
22242    const ID: u32 = 390u32;
22243    const NAME: &'static str = "ONBOARD_COMPUTER_STATUS";
22244    const EXTRA_CRC: u8 = 156u8;
22245    const ENCODED_LEN: usize = 238usize;
22246    fn deser(
22247        _version: MavlinkVersion,
22248        __input: &[u8],
22249    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22250        let avail_len = __input.len();
22251        let mut payload_buf = [0; Self::ENCODED_LEN];
22252        let mut buf = if avail_len < Self::ENCODED_LEN {
22253            payload_buf[0..avail_len].copy_from_slice(__input);
22254            Bytes::new(&payload_buf)
22255        } else {
22256            Bytes::new(__input)
22257        };
22258        let mut __struct = Self::default();
22259        __struct.time_usec = buf.get_u64_le()?;
22260        __struct.uptime = buf.get_u32_le()?;
22261        __struct.ram_usage = buf.get_u32_le()?;
22262        __struct.ram_total = buf.get_u32_le()?;
22263        for v in &mut __struct.storage_type {
22264            let val = buf.get_u32_le()?;
22265            *v = val;
22266        }
22267        for v in &mut __struct.storage_usage {
22268            let val = buf.get_u32_le()?;
22269            *v = val;
22270        }
22271        for v in &mut __struct.storage_total {
22272            let val = buf.get_u32_le()?;
22273            *v = val;
22274        }
22275        for v in &mut __struct.link_type {
22276            let val = buf.get_u32_le()?;
22277            *v = val;
22278        }
22279        for v in &mut __struct.link_tx_rate {
22280            let val = buf.get_u32_le()?;
22281            *v = val;
22282        }
22283        for v in &mut __struct.link_rx_rate {
22284            let val = buf.get_u32_le()?;
22285            *v = val;
22286        }
22287        for v in &mut __struct.link_tx_max {
22288            let val = buf.get_u32_le()?;
22289            *v = val;
22290        }
22291        for v in &mut __struct.link_rx_max {
22292            let val = buf.get_u32_le()?;
22293            *v = val;
22294        }
22295        for v in &mut __struct.fan_speed {
22296            let val = buf.get_i16_le()?;
22297            *v = val;
22298        }
22299        __struct.mavtype = buf.get_u8()?;
22300        for v in &mut __struct.cpu_cores {
22301            let val = buf.get_u8()?;
22302            *v = val;
22303        }
22304        for v in &mut __struct.cpu_combined {
22305            let val = buf.get_u8()?;
22306            *v = val;
22307        }
22308        for v in &mut __struct.gpu_cores {
22309            let val = buf.get_u8()?;
22310            *v = val;
22311        }
22312        for v in &mut __struct.gpu_combined {
22313            let val = buf.get_u8()?;
22314            *v = val;
22315        }
22316        __struct.temperature_board = buf.get_i8()?;
22317        for v in &mut __struct.temperature_core {
22318            let val = buf.get_i8()?;
22319            *v = val;
22320        }
22321        Ok(__struct)
22322    }
22323    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22324        let mut __tmp = BytesMut::new(bytes);
22325        #[allow(clippy::absurd_extreme_comparisons)]
22326        #[allow(unused_comparisons)]
22327        if __tmp.remaining() < Self::ENCODED_LEN {
22328            panic!(
22329                "buffer is too small (need {} bytes, but got {})",
22330                Self::ENCODED_LEN,
22331                __tmp.remaining(),
22332            )
22333        }
22334        __tmp.put_u64_le(self.time_usec);
22335        __tmp.put_u32_le(self.uptime);
22336        __tmp.put_u32_le(self.ram_usage);
22337        __tmp.put_u32_le(self.ram_total);
22338        for val in &self.storage_type {
22339            __tmp.put_u32_le(*val);
22340        }
22341        for val in &self.storage_usage {
22342            __tmp.put_u32_le(*val);
22343        }
22344        for val in &self.storage_total {
22345            __tmp.put_u32_le(*val);
22346        }
22347        for val in &self.link_type {
22348            __tmp.put_u32_le(*val);
22349        }
22350        for val in &self.link_tx_rate {
22351            __tmp.put_u32_le(*val);
22352        }
22353        for val in &self.link_rx_rate {
22354            __tmp.put_u32_le(*val);
22355        }
22356        for val in &self.link_tx_max {
22357            __tmp.put_u32_le(*val);
22358        }
22359        for val in &self.link_rx_max {
22360            __tmp.put_u32_le(*val);
22361        }
22362        for val in &self.fan_speed {
22363            __tmp.put_i16_le(*val);
22364        }
22365        __tmp.put_u8(self.mavtype);
22366        for val in &self.cpu_cores {
22367            __tmp.put_u8(*val);
22368        }
22369        for val in &self.cpu_combined {
22370            __tmp.put_u8(*val);
22371        }
22372        for val in &self.gpu_cores {
22373            __tmp.put_u8(*val);
22374        }
22375        for val in &self.gpu_combined {
22376            __tmp.put_u8(*val);
22377        }
22378        __tmp.put_i8(self.temperature_board);
22379        for val in &self.temperature_core {
22380            __tmp.put_i8(*val);
22381        }
22382        if matches!(version, MavlinkVersion::V2) {
22383            let len = __tmp.len();
22384            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22385        } else {
22386            __tmp.len()
22387        }
22388    }
22389}
22390#[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
22391#[doc = ""]
22392#[doc = "ID: 12918"]
22393#[derive(Debug, Clone, PartialEq)]
22394#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22395#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22396#[cfg_attr(feature = "ts", derive(TS))]
22397#[cfg_attr(feature = "ts", ts(export))]
22398pub struct OPEN_DRONE_ID_ARM_STATUS_DATA {
22399    #[doc = "Status level indicating if arming is allowed."]
22400    pub status: MavOdidArmStatus,
22401    #[doc = "Text error message, should be empty if status is good to arm. Fill with nulls in unused portion."]
22402    #[cfg_attr(feature = "ts", ts(type = "string"))]
22403    pub error: CharArray<50>,
22404}
22405impl OPEN_DRONE_ID_ARM_STATUS_DATA {
22406    pub const ENCODED_LEN: usize = 51usize;
22407    pub const DEFAULT: Self = Self {
22408        status: MavOdidArmStatus::DEFAULT,
22409        error: CharArray::new([0_u8; 50usize]),
22410    };
22411    #[cfg(feature = "arbitrary")]
22412    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22413        use arbitrary::{Arbitrary, Unstructured};
22414        let mut buf = [0u8; 1024];
22415        rng.fill_bytes(&mut buf);
22416        let mut unstructured = Unstructured::new(&buf);
22417        Self::arbitrary(&mut unstructured).unwrap_or_default()
22418    }
22419}
22420impl Default for OPEN_DRONE_ID_ARM_STATUS_DATA {
22421    fn default() -> Self {
22422        Self::DEFAULT.clone()
22423    }
22424}
22425impl MessageData for OPEN_DRONE_ID_ARM_STATUS_DATA {
22426    type Message = MavMessage;
22427    const ID: u32 = 12918u32;
22428    const NAME: &'static str = "OPEN_DRONE_ID_ARM_STATUS";
22429    const EXTRA_CRC: u8 = 139u8;
22430    const ENCODED_LEN: usize = 51usize;
22431    fn deser(
22432        _version: MavlinkVersion,
22433        __input: &[u8],
22434    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22435        let avail_len = __input.len();
22436        let mut payload_buf = [0; Self::ENCODED_LEN];
22437        let mut buf = if avail_len < Self::ENCODED_LEN {
22438            payload_buf[0..avail_len].copy_from_slice(__input);
22439            Bytes::new(&payload_buf)
22440        } else {
22441            Bytes::new(__input)
22442        };
22443        let mut __struct = Self::default();
22444        let tmp = buf.get_u8()?;
22445        __struct.status =
22446            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22447                enum_type: "MavOdidArmStatus",
22448                value: tmp as u64,
22449            })?;
22450        let mut tmp = [0_u8; 50usize];
22451        for v in &mut tmp {
22452            *v = buf.get_u8()?;
22453        }
22454        __struct.error = CharArray::new(tmp);
22455        Ok(__struct)
22456    }
22457    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22458        let mut __tmp = BytesMut::new(bytes);
22459        #[allow(clippy::absurd_extreme_comparisons)]
22460        #[allow(unused_comparisons)]
22461        if __tmp.remaining() < Self::ENCODED_LEN {
22462            panic!(
22463                "buffer is too small (need {} bytes, but got {})",
22464                Self::ENCODED_LEN,
22465                __tmp.remaining(),
22466            )
22467        }
22468        __tmp.put_u8(self.status as u8);
22469        for val in &self.error {
22470            __tmp.put_u8(*val);
22471        }
22472        if matches!(version, MavlinkVersion::V2) {
22473            let len = __tmp.len();
22474            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22475        } else {
22476            __tmp.len()
22477        }
22478    }
22479}
22480#[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
22481#[doc = ""]
22482#[doc = "ID: 12902"]
22483#[derive(Debug, Clone, PartialEq)]
22484#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22485#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22486#[cfg_attr(feature = "ts", derive(TS))]
22487#[cfg_attr(feature = "ts", ts(export))]
22488pub struct OPEN_DRONE_ID_AUTHENTICATION_DATA {
22489    #[doc = "This field is only present for page 0. 32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
22490    pub timestamp: u32,
22491    #[doc = "System ID (0 for broadcast)."]
22492    pub target_system: u8,
22493    #[doc = "Component ID (0 for broadcast)."]
22494    pub target_component: u8,
22495    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22496    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22497    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22498    pub id_or_mac: [u8; 20],
22499    #[doc = "Indicates the type of authentication."]
22500    pub authentication_type: MavOdidAuthType,
22501    #[doc = "Allowed range is 0 - 15."]
22502    pub data_page: u8,
22503    #[doc = "This field is only present for page 0. Allowed range is 0 - 15. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
22504    pub last_page_index: u8,
22505    #[doc = "This field is only present for page 0. Total bytes of authentication_data from all data pages. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
22506    pub length: u8,
22507    #[doc = "Opaque authentication data. For page 0, the size is only 17 bytes. For other pages, the size is 23 bytes. Shall be filled with nulls in the unused portion of the field."]
22508    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22509    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22510    pub authentication_data: [u8; 23],
22511}
22512impl OPEN_DRONE_ID_AUTHENTICATION_DATA {
22513    pub const ENCODED_LEN: usize = 53usize;
22514    pub const DEFAULT: Self = Self {
22515        timestamp: 0_u32,
22516        target_system: 0_u8,
22517        target_component: 0_u8,
22518        id_or_mac: [0_u8; 20usize],
22519        authentication_type: MavOdidAuthType::DEFAULT,
22520        data_page: 0_u8,
22521        last_page_index: 0_u8,
22522        length: 0_u8,
22523        authentication_data: [0_u8; 23usize],
22524    };
22525    #[cfg(feature = "arbitrary")]
22526    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22527        use arbitrary::{Arbitrary, Unstructured};
22528        let mut buf = [0u8; 1024];
22529        rng.fill_bytes(&mut buf);
22530        let mut unstructured = Unstructured::new(&buf);
22531        Self::arbitrary(&mut unstructured).unwrap_or_default()
22532    }
22533}
22534impl Default for OPEN_DRONE_ID_AUTHENTICATION_DATA {
22535    fn default() -> Self {
22536        Self::DEFAULT.clone()
22537    }
22538}
22539impl MessageData for OPEN_DRONE_ID_AUTHENTICATION_DATA {
22540    type Message = MavMessage;
22541    const ID: u32 = 12902u32;
22542    const NAME: &'static str = "OPEN_DRONE_ID_AUTHENTICATION";
22543    const EXTRA_CRC: u8 = 140u8;
22544    const ENCODED_LEN: usize = 53usize;
22545    fn deser(
22546        _version: MavlinkVersion,
22547        __input: &[u8],
22548    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22549        let avail_len = __input.len();
22550        let mut payload_buf = [0; Self::ENCODED_LEN];
22551        let mut buf = if avail_len < Self::ENCODED_LEN {
22552            payload_buf[0..avail_len].copy_from_slice(__input);
22553            Bytes::new(&payload_buf)
22554        } else {
22555            Bytes::new(__input)
22556        };
22557        let mut __struct = Self::default();
22558        __struct.timestamp = buf.get_u32_le()?;
22559        __struct.target_system = buf.get_u8()?;
22560        __struct.target_component = buf.get_u8()?;
22561        for v in &mut __struct.id_or_mac {
22562            let val = buf.get_u8()?;
22563            *v = val;
22564        }
22565        let tmp = buf.get_u8()?;
22566        __struct.authentication_type =
22567            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22568                enum_type: "MavOdidAuthType",
22569                value: tmp as u64,
22570            })?;
22571        __struct.data_page = buf.get_u8()?;
22572        __struct.last_page_index = buf.get_u8()?;
22573        __struct.length = buf.get_u8()?;
22574        for v in &mut __struct.authentication_data {
22575            let val = buf.get_u8()?;
22576            *v = val;
22577        }
22578        Ok(__struct)
22579    }
22580    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22581        let mut __tmp = BytesMut::new(bytes);
22582        #[allow(clippy::absurd_extreme_comparisons)]
22583        #[allow(unused_comparisons)]
22584        if __tmp.remaining() < Self::ENCODED_LEN {
22585            panic!(
22586                "buffer is too small (need {} bytes, but got {})",
22587                Self::ENCODED_LEN,
22588                __tmp.remaining(),
22589            )
22590        }
22591        __tmp.put_u32_le(self.timestamp);
22592        __tmp.put_u8(self.target_system);
22593        __tmp.put_u8(self.target_component);
22594        for val in &self.id_or_mac {
22595            __tmp.put_u8(*val);
22596        }
22597        __tmp.put_u8(self.authentication_type as u8);
22598        __tmp.put_u8(self.data_page);
22599        __tmp.put_u8(self.last_page_index);
22600        __tmp.put_u8(self.length);
22601        for val in &self.authentication_data {
22602            __tmp.put_u8(*val);
22603        }
22604        if matches!(version, MavlinkVersion::V2) {
22605            let len = __tmp.len();
22606            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22607        } else {
22608            __tmp.len()
22609        }
22610    }
22611}
22612#[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
22613#[doc = ""]
22614#[doc = "ID: 12900"]
22615#[derive(Debug, Clone, PartialEq)]
22616#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22617#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22618#[cfg_attr(feature = "ts", derive(TS))]
22619#[cfg_attr(feature = "ts", ts(export))]
22620pub struct OPEN_DRONE_ID_BASIC_ID_DATA {
22621    #[doc = "System ID (0 for broadcast)."]
22622    pub target_system: u8,
22623    #[doc = "Component ID (0 for broadcast)."]
22624    pub target_component: u8,
22625    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22626    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22627    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22628    pub id_or_mac: [u8; 20],
22629    #[doc = "Indicates the format for the uas_id field of this message."]
22630    pub id_type: MavOdidIdType,
22631    #[doc = "Indicates the type of UA (Unmanned Aircraft)."]
22632    pub ua_type: MavOdidUaType,
22633    #[doc = "UAS (Unmanned Aircraft System) ID following the format specified by id_type. Shall be filled with nulls in the unused portion of the field."]
22634    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22635    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22636    pub uas_id: [u8; 20],
22637}
22638impl OPEN_DRONE_ID_BASIC_ID_DATA {
22639    pub const ENCODED_LEN: usize = 44usize;
22640    pub const DEFAULT: Self = Self {
22641        target_system: 0_u8,
22642        target_component: 0_u8,
22643        id_or_mac: [0_u8; 20usize],
22644        id_type: MavOdidIdType::DEFAULT,
22645        ua_type: MavOdidUaType::DEFAULT,
22646        uas_id: [0_u8; 20usize],
22647    };
22648    #[cfg(feature = "arbitrary")]
22649    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22650        use arbitrary::{Arbitrary, Unstructured};
22651        let mut buf = [0u8; 1024];
22652        rng.fill_bytes(&mut buf);
22653        let mut unstructured = Unstructured::new(&buf);
22654        Self::arbitrary(&mut unstructured).unwrap_or_default()
22655    }
22656}
22657impl Default for OPEN_DRONE_ID_BASIC_ID_DATA {
22658    fn default() -> Self {
22659        Self::DEFAULT.clone()
22660    }
22661}
22662impl MessageData for OPEN_DRONE_ID_BASIC_ID_DATA {
22663    type Message = MavMessage;
22664    const ID: u32 = 12900u32;
22665    const NAME: &'static str = "OPEN_DRONE_ID_BASIC_ID";
22666    const EXTRA_CRC: u8 = 114u8;
22667    const ENCODED_LEN: usize = 44usize;
22668    fn deser(
22669        _version: MavlinkVersion,
22670        __input: &[u8],
22671    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22672        let avail_len = __input.len();
22673        let mut payload_buf = [0; Self::ENCODED_LEN];
22674        let mut buf = if avail_len < Self::ENCODED_LEN {
22675            payload_buf[0..avail_len].copy_from_slice(__input);
22676            Bytes::new(&payload_buf)
22677        } else {
22678            Bytes::new(__input)
22679        };
22680        let mut __struct = Self::default();
22681        __struct.target_system = buf.get_u8()?;
22682        __struct.target_component = buf.get_u8()?;
22683        for v in &mut __struct.id_or_mac {
22684            let val = buf.get_u8()?;
22685            *v = val;
22686        }
22687        let tmp = buf.get_u8()?;
22688        __struct.id_type =
22689            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22690                enum_type: "MavOdidIdType",
22691                value: tmp as u64,
22692            })?;
22693        let tmp = buf.get_u8()?;
22694        __struct.ua_type =
22695            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22696                enum_type: "MavOdidUaType",
22697                value: tmp as u64,
22698            })?;
22699        for v in &mut __struct.uas_id {
22700            let val = buf.get_u8()?;
22701            *v = val;
22702        }
22703        Ok(__struct)
22704    }
22705    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22706        let mut __tmp = BytesMut::new(bytes);
22707        #[allow(clippy::absurd_extreme_comparisons)]
22708        #[allow(unused_comparisons)]
22709        if __tmp.remaining() < Self::ENCODED_LEN {
22710            panic!(
22711                "buffer is too small (need {} bytes, but got {})",
22712                Self::ENCODED_LEN,
22713                __tmp.remaining(),
22714            )
22715        }
22716        __tmp.put_u8(self.target_system);
22717        __tmp.put_u8(self.target_component);
22718        for val in &self.id_or_mac {
22719            __tmp.put_u8(*val);
22720        }
22721        __tmp.put_u8(self.id_type as u8);
22722        __tmp.put_u8(self.ua_type as u8);
22723        for val in &self.uas_id {
22724            __tmp.put_u8(*val);
22725        }
22726        if matches!(version, MavlinkVersion::V2) {
22727            let len = __tmp.len();
22728            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22729        } else {
22730            __tmp.len()
22731        }
22732    }
22733}
22734#[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
22735#[doc = ""]
22736#[doc = "ID: 12901"]
22737#[derive(Debug, Clone, PartialEq)]
22738#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22739#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22740#[cfg_attr(feature = "ts", derive(TS))]
22741#[cfg_attr(feature = "ts", ts(export))]
22742pub struct OPEN_DRONE_ID_LOCATION_DATA {
22743    #[doc = "Current latitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
22744    pub latitude: i32,
22745    #[doc = "Current longitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
22746    pub longitude: i32,
22747    #[doc = "The altitude calculated from the barometric pressue. Reference is against 29.92inHg or 1013.2mb. If unknown: -1000 m."]
22748    pub altitude_barometric: f32,
22749    #[doc = "The geodetic altitude as defined by WGS84. If unknown: -1000 m."]
22750    pub altitude_geodetic: f32,
22751    #[doc = "The current height of the unmanned aircraft above the take-off location or the ground as indicated by height_reference. If unknown: -1000 m."]
22752    pub height: f32,
22753    #[doc = "Seconds after the full hour with reference to UTC time. Typically the GPS outputs a time-of-week value in milliseconds. First convert that to UTC and then convert for this field using ((float) (time_week_ms % (60*60*1000))) / 1000. If unknown: 0xFFFF."]
22754    pub timestamp: f32,
22755    #[doc = "Direction over ground (not heading, but direction of movement) measured clockwise from true North: 0 - 35999 centi-degrees. If unknown: 36100 centi-degrees."]
22756    pub direction: u16,
22757    #[doc = "Ground speed. Positive only. If unknown: 25500 cm/s. If speed is larger than 25425 cm/s, use 25425 cm/s."]
22758    pub speed_horizontal: u16,
22759    #[doc = "The vertical speed. Up is positive. If unknown: 6300 cm/s. If speed is larger than 6200 cm/s, use 6200 cm/s. If lower than -6200 cm/s, use -6200 cm/s."]
22760    pub speed_vertical: i16,
22761    #[doc = "System ID (0 for broadcast)."]
22762    pub target_system: u8,
22763    #[doc = "Component ID (0 for broadcast)."]
22764    pub target_component: u8,
22765    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22766    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22767    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22768    pub id_or_mac: [u8; 20],
22769    #[doc = "Indicates whether the unmanned aircraft is on the ground or in the air."]
22770    pub status: MavOdidStatus,
22771    #[doc = "Indicates the reference point for the height field."]
22772    pub height_reference: MavOdidHeightRef,
22773    #[doc = "The accuracy of the horizontal position."]
22774    pub horizontal_accuracy: MavOdidHorAcc,
22775    #[doc = "The accuracy of the vertical position."]
22776    pub vertical_accuracy: MavOdidVerAcc,
22777    #[doc = "The accuracy of the barometric altitude."]
22778    pub barometer_accuracy: MavOdidVerAcc,
22779    #[doc = "The accuracy of the horizontal and vertical speed."]
22780    pub speed_accuracy: MavOdidSpeedAcc,
22781    #[doc = "The accuracy of the timestamps."]
22782    pub timestamp_accuracy: MavOdidTimeAcc,
22783}
22784impl OPEN_DRONE_ID_LOCATION_DATA {
22785    pub const ENCODED_LEN: usize = 59usize;
22786    pub const DEFAULT: Self = Self {
22787        latitude: 0_i32,
22788        longitude: 0_i32,
22789        altitude_barometric: 0.0_f32,
22790        altitude_geodetic: 0.0_f32,
22791        height: 0.0_f32,
22792        timestamp: 0.0_f32,
22793        direction: 0_u16,
22794        speed_horizontal: 0_u16,
22795        speed_vertical: 0_i16,
22796        target_system: 0_u8,
22797        target_component: 0_u8,
22798        id_or_mac: [0_u8; 20usize],
22799        status: MavOdidStatus::DEFAULT,
22800        height_reference: MavOdidHeightRef::DEFAULT,
22801        horizontal_accuracy: MavOdidHorAcc::DEFAULT,
22802        vertical_accuracy: MavOdidVerAcc::DEFAULT,
22803        barometer_accuracy: MavOdidVerAcc::DEFAULT,
22804        speed_accuracy: MavOdidSpeedAcc::DEFAULT,
22805        timestamp_accuracy: MavOdidTimeAcc::DEFAULT,
22806    };
22807    #[cfg(feature = "arbitrary")]
22808    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22809        use arbitrary::{Arbitrary, Unstructured};
22810        let mut buf = [0u8; 1024];
22811        rng.fill_bytes(&mut buf);
22812        let mut unstructured = Unstructured::new(&buf);
22813        Self::arbitrary(&mut unstructured).unwrap_or_default()
22814    }
22815}
22816impl Default for OPEN_DRONE_ID_LOCATION_DATA {
22817    fn default() -> Self {
22818        Self::DEFAULT.clone()
22819    }
22820}
22821impl MessageData for OPEN_DRONE_ID_LOCATION_DATA {
22822    type Message = MavMessage;
22823    const ID: u32 = 12901u32;
22824    const NAME: &'static str = "OPEN_DRONE_ID_LOCATION";
22825    const EXTRA_CRC: u8 = 254u8;
22826    const ENCODED_LEN: usize = 59usize;
22827    fn deser(
22828        _version: MavlinkVersion,
22829        __input: &[u8],
22830    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22831        let avail_len = __input.len();
22832        let mut payload_buf = [0; Self::ENCODED_LEN];
22833        let mut buf = if avail_len < Self::ENCODED_LEN {
22834            payload_buf[0..avail_len].copy_from_slice(__input);
22835            Bytes::new(&payload_buf)
22836        } else {
22837            Bytes::new(__input)
22838        };
22839        let mut __struct = Self::default();
22840        __struct.latitude = buf.get_i32_le()?;
22841        __struct.longitude = buf.get_i32_le()?;
22842        __struct.altitude_barometric = buf.get_f32_le()?;
22843        __struct.altitude_geodetic = buf.get_f32_le()?;
22844        __struct.height = buf.get_f32_le()?;
22845        __struct.timestamp = buf.get_f32_le()?;
22846        __struct.direction = buf.get_u16_le()?;
22847        __struct.speed_horizontal = buf.get_u16_le()?;
22848        __struct.speed_vertical = buf.get_i16_le()?;
22849        __struct.target_system = buf.get_u8()?;
22850        __struct.target_component = buf.get_u8()?;
22851        for v in &mut __struct.id_or_mac {
22852            let val = buf.get_u8()?;
22853            *v = val;
22854        }
22855        let tmp = buf.get_u8()?;
22856        __struct.status =
22857            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22858                enum_type: "MavOdidStatus",
22859                value: tmp as u64,
22860            })?;
22861        let tmp = buf.get_u8()?;
22862        __struct.height_reference =
22863            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22864                enum_type: "MavOdidHeightRef",
22865                value: tmp as u64,
22866            })?;
22867        let tmp = buf.get_u8()?;
22868        __struct.horizontal_accuracy =
22869            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22870                enum_type: "MavOdidHorAcc",
22871                value: tmp as u64,
22872            })?;
22873        let tmp = buf.get_u8()?;
22874        __struct.vertical_accuracy =
22875            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22876                enum_type: "MavOdidVerAcc",
22877                value: tmp as u64,
22878            })?;
22879        let tmp = buf.get_u8()?;
22880        __struct.barometer_accuracy =
22881            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22882                enum_type: "MavOdidVerAcc",
22883                value: tmp as u64,
22884            })?;
22885        let tmp = buf.get_u8()?;
22886        __struct.speed_accuracy =
22887            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22888                enum_type: "MavOdidSpeedAcc",
22889                value: tmp as u64,
22890            })?;
22891        let tmp = buf.get_u8()?;
22892        __struct.timestamp_accuracy =
22893            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22894                enum_type: "MavOdidTimeAcc",
22895                value: tmp as u64,
22896            })?;
22897        Ok(__struct)
22898    }
22899    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22900        let mut __tmp = BytesMut::new(bytes);
22901        #[allow(clippy::absurd_extreme_comparisons)]
22902        #[allow(unused_comparisons)]
22903        if __tmp.remaining() < Self::ENCODED_LEN {
22904            panic!(
22905                "buffer is too small (need {} bytes, but got {})",
22906                Self::ENCODED_LEN,
22907                __tmp.remaining(),
22908            )
22909        }
22910        __tmp.put_i32_le(self.latitude);
22911        __tmp.put_i32_le(self.longitude);
22912        __tmp.put_f32_le(self.altitude_barometric);
22913        __tmp.put_f32_le(self.altitude_geodetic);
22914        __tmp.put_f32_le(self.height);
22915        __tmp.put_f32_le(self.timestamp);
22916        __tmp.put_u16_le(self.direction);
22917        __tmp.put_u16_le(self.speed_horizontal);
22918        __tmp.put_i16_le(self.speed_vertical);
22919        __tmp.put_u8(self.target_system);
22920        __tmp.put_u8(self.target_component);
22921        for val in &self.id_or_mac {
22922            __tmp.put_u8(*val);
22923        }
22924        __tmp.put_u8(self.status as u8);
22925        __tmp.put_u8(self.height_reference as u8);
22926        __tmp.put_u8(self.horizontal_accuracy as u8);
22927        __tmp.put_u8(self.vertical_accuracy as u8);
22928        __tmp.put_u8(self.barometer_accuracy as u8);
22929        __tmp.put_u8(self.speed_accuracy as u8);
22930        __tmp.put_u8(self.timestamp_accuracy as u8);
22931        if matches!(version, MavlinkVersion::V2) {
22932            let len = __tmp.len();
22933            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22934        } else {
22935            __tmp.len()
22936        }
22937    }
22938}
22939#[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
22940#[doc = ""]
22941#[doc = "ID: 12915"]
22942#[derive(Debug, Clone, PartialEq)]
22943#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22944#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22945#[cfg_attr(feature = "ts", derive(TS))]
22946#[cfg_attr(feature = "ts", ts(export))]
22947pub struct OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22948    #[doc = "System ID (0 for broadcast)."]
22949    pub target_system: u8,
22950    #[doc = "Component ID (0 for broadcast)."]
22951    pub target_component: u8,
22952    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22953    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22954    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22955    pub id_or_mac: [u8; 20],
22956    #[doc = "This field must currently always be equal to 25 (bytes), since all encoded OpenDroneID messages are specified to have this length."]
22957    pub single_message_size: u8,
22958    #[doc = "Number of encoded messages in the pack (not the number of bytes). Allowed range is 1 - 9."]
22959    pub msg_pack_size: u8,
22960    #[doc = "Concatenation of encoded OpenDroneID messages. Shall be filled with nulls in the unused portion of the field."]
22961    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22962    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
22963    pub messages: [u8; 225],
22964}
22965impl OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22966    pub const ENCODED_LEN: usize = 249usize;
22967    pub const DEFAULT: Self = Self {
22968        target_system: 0_u8,
22969        target_component: 0_u8,
22970        id_or_mac: [0_u8; 20usize],
22971        single_message_size: 0_u8,
22972        msg_pack_size: 0_u8,
22973        messages: [0_u8; 225usize],
22974    };
22975    #[cfg(feature = "arbitrary")]
22976    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22977        use arbitrary::{Arbitrary, Unstructured};
22978        let mut buf = [0u8; 1024];
22979        rng.fill_bytes(&mut buf);
22980        let mut unstructured = Unstructured::new(&buf);
22981        Self::arbitrary(&mut unstructured).unwrap_or_default()
22982    }
22983}
22984impl Default for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22985    fn default() -> Self {
22986        Self::DEFAULT.clone()
22987    }
22988}
22989impl MessageData for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22990    type Message = MavMessage;
22991    const ID: u32 = 12915u32;
22992    const NAME: &'static str = "OPEN_DRONE_ID_MESSAGE_PACK";
22993    const EXTRA_CRC: u8 = 94u8;
22994    const ENCODED_LEN: usize = 249usize;
22995    fn deser(
22996        _version: MavlinkVersion,
22997        __input: &[u8],
22998    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22999        let avail_len = __input.len();
23000        let mut payload_buf = [0; Self::ENCODED_LEN];
23001        let mut buf = if avail_len < Self::ENCODED_LEN {
23002            payload_buf[0..avail_len].copy_from_slice(__input);
23003            Bytes::new(&payload_buf)
23004        } else {
23005            Bytes::new(__input)
23006        };
23007        let mut __struct = Self::default();
23008        __struct.target_system = buf.get_u8()?;
23009        __struct.target_component = buf.get_u8()?;
23010        for v in &mut __struct.id_or_mac {
23011            let val = buf.get_u8()?;
23012            *v = val;
23013        }
23014        __struct.single_message_size = buf.get_u8()?;
23015        __struct.msg_pack_size = buf.get_u8()?;
23016        for v in &mut __struct.messages {
23017            let val = buf.get_u8()?;
23018            *v = val;
23019        }
23020        Ok(__struct)
23021    }
23022    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23023        let mut __tmp = BytesMut::new(bytes);
23024        #[allow(clippy::absurd_extreme_comparisons)]
23025        #[allow(unused_comparisons)]
23026        if __tmp.remaining() < Self::ENCODED_LEN {
23027            panic!(
23028                "buffer is too small (need {} bytes, but got {})",
23029                Self::ENCODED_LEN,
23030                __tmp.remaining(),
23031            )
23032        }
23033        __tmp.put_u8(self.target_system);
23034        __tmp.put_u8(self.target_component);
23035        for val in &self.id_or_mac {
23036            __tmp.put_u8(*val);
23037        }
23038        __tmp.put_u8(self.single_message_size);
23039        __tmp.put_u8(self.msg_pack_size);
23040        for val in &self.messages {
23041            __tmp.put_u8(*val);
23042        }
23043        if matches!(version, MavlinkVersion::V2) {
23044            let len = __tmp.len();
23045            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23046        } else {
23047            __tmp.len()
23048        }
23049    }
23050}
23051#[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
23052#[doc = ""]
23053#[doc = "ID: 12905"]
23054#[derive(Debug, Clone, PartialEq)]
23055#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23056#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23057#[cfg_attr(feature = "ts", derive(TS))]
23058#[cfg_attr(feature = "ts", ts(export))]
23059pub struct OPEN_DRONE_ID_OPERATOR_ID_DATA {
23060    #[doc = "System ID (0 for broadcast)."]
23061    pub target_system: u8,
23062    #[doc = "Component ID (0 for broadcast)."]
23063    pub target_component: u8,
23064    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
23065    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23066    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23067    pub id_or_mac: [u8; 20],
23068    #[doc = "Indicates the type of the operator_id field."]
23069    pub operator_id_type: MavOdidOperatorIdType,
23070    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
23071    #[cfg_attr(feature = "ts", ts(type = "string"))]
23072    pub operator_id: CharArray<20>,
23073}
23074impl OPEN_DRONE_ID_OPERATOR_ID_DATA {
23075    pub const ENCODED_LEN: usize = 43usize;
23076    pub const DEFAULT: Self = Self {
23077        target_system: 0_u8,
23078        target_component: 0_u8,
23079        id_or_mac: [0_u8; 20usize],
23080        operator_id_type: MavOdidOperatorIdType::DEFAULT,
23081        operator_id: CharArray::new([0_u8; 20usize]),
23082    };
23083    #[cfg(feature = "arbitrary")]
23084    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23085        use arbitrary::{Arbitrary, Unstructured};
23086        let mut buf = [0u8; 1024];
23087        rng.fill_bytes(&mut buf);
23088        let mut unstructured = Unstructured::new(&buf);
23089        Self::arbitrary(&mut unstructured).unwrap_or_default()
23090    }
23091}
23092impl Default for OPEN_DRONE_ID_OPERATOR_ID_DATA {
23093    fn default() -> Self {
23094        Self::DEFAULT.clone()
23095    }
23096}
23097impl MessageData for OPEN_DRONE_ID_OPERATOR_ID_DATA {
23098    type Message = MavMessage;
23099    const ID: u32 = 12905u32;
23100    const NAME: &'static str = "OPEN_DRONE_ID_OPERATOR_ID";
23101    const EXTRA_CRC: u8 = 49u8;
23102    const ENCODED_LEN: usize = 43usize;
23103    fn deser(
23104        _version: MavlinkVersion,
23105        __input: &[u8],
23106    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23107        let avail_len = __input.len();
23108        let mut payload_buf = [0; Self::ENCODED_LEN];
23109        let mut buf = if avail_len < Self::ENCODED_LEN {
23110            payload_buf[0..avail_len].copy_from_slice(__input);
23111            Bytes::new(&payload_buf)
23112        } else {
23113            Bytes::new(__input)
23114        };
23115        let mut __struct = Self::default();
23116        __struct.target_system = buf.get_u8()?;
23117        __struct.target_component = buf.get_u8()?;
23118        for v in &mut __struct.id_or_mac {
23119            let val = buf.get_u8()?;
23120            *v = val;
23121        }
23122        let tmp = buf.get_u8()?;
23123        __struct.operator_id_type =
23124            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23125                enum_type: "MavOdidOperatorIdType",
23126                value: tmp as u64,
23127            })?;
23128        let mut tmp = [0_u8; 20usize];
23129        for v in &mut tmp {
23130            *v = buf.get_u8()?;
23131        }
23132        __struct.operator_id = CharArray::new(tmp);
23133        Ok(__struct)
23134    }
23135    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23136        let mut __tmp = BytesMut::new(bytes);
23137        #[allow(clippy::absurd_extreme_comparisons)]
23138        #[allow(unused_comparisons)]
23139        if __tmp.remaining() < Self::ENCODED_LEN {
23140            panic!(
23141                "buffer is too small (need {} bytes, but got {})",
23142                Self::ENCODED_LEN,
23143                __tmp.remaining(),
23144            )
23145        }
23146        __tmp.put_u8(self.target_system);
23147        __tmp.put_u8(self.target_component);
23148        for val in &self.id_or_mac {
23149            __tmp.put_u8(*val);
23150        }
23151        __tmp.put_u8(self.operator_id_type as u8);
23152        for val in &self.operator_id {
23153            __tmp.put_u8(*val);
23154        }
23155        if matches!(version, MavlinkVersion::V2) {
23156            let len = __tmp.len();
23157            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23158        } else {
23159            __tmp.len()
23160        }
23161    }
23162}
23163#[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
23164#[doc = ""]
23165#[doc = "ID: 12903"]
23166#[derive(Debug, Clone, PartialEq)]
23167#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23168#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23169#[cfg_attr(feature = "ts", derive(TS))]
23170#[cfg_attr(feature = "ts", ts(export))]
23171pub struct OPEN_DRONE_ID_SELF_ID_DATA {
23172    #[doc = "System ID (0 for broadcast)."]
23173    pub target_system: u8,
23174    #[doc = "Component ID (0 for broadcast)."]
23175    pub target_component: u8,
23176    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
23177    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23178    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23179    pub id_or_mac: [u8; 20],
23180    #[doc = "Indicates the type of the description field."]
23181    pub description_type: MavOdidDescType,
23182    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
23183    #[cfg_attr(feature = "ts", ts(type = "string"))]
23184    pub description: CharArray<23>,
23185}
23186impl OPEN_DRONE_ID_SELF_ID_DATA {
23187    pub const ENCODED_LEN: usize = 46usize;
23188    pub const DEFAULT: Self = Self {
23189        target_system: 0_u8,
23190        target_component: 0_u8,
23191        id_or_mac: [0_u8; 20usize],
23192        description_type: MavOdidDescType::DEFAULT,
23193        description: CharArray::new([0_u8; 23usize]),
23194    };
23195    #[cfg(feature = "arbitrary")]
23196    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23197        use arbitrary::{Arbitrary, Unstructured};
23198        let mut buf = [0u8; 1024];
23199        rng.fill_bytes(&mut buf);
23200        let mut unstructured = Unstructured::new(&buf);
23201        Self::arbitrary(&mut unstructured).unwrap_or_default()
23202    }
23203}
23204impl Default for OPEN_DRONE_ID_SELF_ID_DATA {
23205    fn default() -> Self {
23206        Self::DEFAULT.clone()
23207    }
23208}
23209impl MessageData for OPEN_DRONE_ID_SELF_ID_DATA {
23210    type Message = MavMessage;
23211    const ID: u32 = 12903u32;
23212    const NAME: &'static str = "OPEN_DRONE_ID_SELF_ID";
23213    const EXTRA_CRC: u8 = 249u8;
23214    const ENCODED_LEN: usize = 46usize;
23215    fn deser(
23216        _version: MavlinkVersion,
23217        __input: &[u8],
23218    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23219        let avail_len = __input.len();
23220        let mut payload_buf = [0; Self::ENCODED_LEN];
23221        let mut buf = if avail_len < Self::ENCODED_LEN {
23222            payload_buf[0..avail_len].copy_from_slice(__input);
23223            Bytes::new(&payload_buf)
23224        } else {
23225            Bytes::new(__input)
23226        };
23227        let mut __struct = Self::default();
23228        __struct.target_system = buf.get_u8()?;
23229        __struct.target_component = buf.get_u8()?;
23230        for v in &mut __struct.id_or_mac {
23231            let val = buf.get_u8()?;
23232            *v = val;
23233        }
23234        let tmp = buf.get_u8()?;
23235        __struct.description_type =
23236            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23237                enum_type: "MavOdidDescType",
23238                value: tmp as u64,
23239            })?;
23240        let mut tmp = [0_u8; 23usize];
23241        for v in &mut tmp {
23242            *v = buf.get_u8()?;
23243        }
23244        __struct.description = CharArray::new(tmp);
23245        Ok(__struct)
23246    }
23247    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23248        let mut __tmp = BytesMut::new(bytes);
23249        #[allow(clippy::absurd_extreme_comparisons)]
23250        #[allow(unused_comparisons)]
23251        if __tmp.remaining() < Self::ENCODED_LEN {
23252            panic!(
23253                "buffer is too small (need {} bytes, but got {})",
23254                Self::ENCODED_LEN,
23255                __tmp.remaining(),
23256            )
23257        }
23258        __tmp.put_u8(self.target_system);
23259        __tmp.put_u8(self.target_component);
23260        for val in &self.id_or_mac {
23261            __tmp.put_u8(*val);
23262        }
23263        __tmp.put_u8(self.description_type as u8);
23264        for val in &self.description {
23265            __tmp.put_u8(*val);
23266        }
23267        if matches!(version, MavlinkVersion::V2) {
23268            let len = __tmp.len();
23269            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23270        } else {
23271            __tmp.len()
23272        }
23273    }
23274}
23275#[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
23276#[doc = ""]
23277#[doc = "ID: 12904"]
23278#[derive(Debug, Clone, PartialEq)]
23279#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23280#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23281#[cfg_attr(feature = "ts", derive(TS))]
23282#[cfg_attr(feature = "ts", ts(export))]
23283pub struct OPEN_DRONE_ID_SYSTEM_DATA {
23284    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
23285    pub operator_latitude: i32,
23286    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
23287    pub operator_longitude: i32,
23288    #[doc = "Area Operations Ceiling relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
23289    pub area_ceiling: f32,
23290    #[doc = "Area Operations Floor relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
23291    pub area_floor: f32,
23292    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
23293    pub operator_altitude_geo: f32,
23294    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
23295    pub timestamp: u32,
23296    #[doc = "Number of aircraft in the area, group or formation (default 1). Used only for swarms/multiple UA."]
23297    pub area_count: u16,
23298    #[doc = "Radius of the cylindrical area of the group or formation (default 0). Used only for swarms/multiple UA."]
23299    pub area_radius: u16,
23300    #[doc = "System ID (0 for broadcast)."]
23301    pub target_system: u8,
23302    #[doc = "Component ID (0 for broadcast)."]
23303    pub target_component: u8,
23304    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
23305    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23306    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
23307    pub id_or_mac: [u8; 20],
23308    #[doc = "Specifies the operator location type."]
23309    pub operator_location_type: MavOdidOperatorLocationType,
23310    #[doc = "Specifies the classification type of the UA."]
23311    pub classification_type: MavOdidClassificationType,
23312    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the category of the UA."]
23313    pub category_eu: MavOdidCategoryEu,
23314    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the class of the UA."]
23315    pub class_eu: MavOdidClassEu,
23316}
23317impl OPEN_DRONE_ID_SYSTEM_DATA {
23318    pub const ENCODED_LEN: usize = 54usize;
23319    pub const DEFAULT: Self = Self {
23320        operator_latitude: 0_i32,
23321        operator_longitude: 0_i32,
23322        area_ceiling: 0.0_f32,
23323        area_floor: 0.0_f32,
23324        operator_altitude_geo: 0.0_f32,
23325        timestamp: 0_u32,
23326        area_count: 0_u16,
23327        area_radius: 0_u16,
23328        target_system: 0_u8,
23329        target_component: 0_u8,
23330        id_or_mac: [0_u8; 20usize],
23331        operator_location_type: MavOdidOperatorLocationType::DEFAULT,
23332        classification_type: MavOdidClassificationType::DEFAULT,
23333        category_eu: MavOdidCategoryEu::DEFAULT,
23334        class_eu: MavOdidClassEu::DEFAULT,
23335    };
23336    #[cfg(feature = "arbitrary")]
23337    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23338        use arbitrary::{Arbitrary, Unstructured};
23339        let mut buf = [0u8; 1024];
23340        rng.fill_bytes(&mut buf);
23341        let mut unstructured = Unstructured::new(&buf);
23342        Self::arbitrary(&mut unstructured).unwrap_or_default()
23343    }
23344}
23345impl Default for OPEN_DRONE_ID_SYSTEM_DATA {
23346    fn default() -> Self {
23347        Self::DEFAULT.clone()
23348    }
23349}
23350impl MessageData for OPEN_DRONE_ID_SYSTEM_DATA {
23351    type Message = MavMessage;
23352    const ID: u32 = 12904u32;
23353    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM";
23354    const EXTRA_CRC: u8 = 77u8;
23355    const ENCODED_LEN: usize = 54usize;
23356    fn deser(
23357        _version: MavlinkVersion,
23358        __input: &[u8],
23359    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23360        let avail_len = __input.len();
23361        let mut payload_buf = [0; Self::ENCODED_LEN];
23362        let mut buf = if avail_len < Self::ENCODED_LEN {
23363            payload_buf[0..avail_len].copy_from_slice(__input);
23364            Bytes::new(&payload_buf)
23365        } else {
23366            Bytes::new(__input)
23367        };
23368        let mut __struct = Self::default();
23369        __struct.operator_latitude = buf.get_i32_le()?;
23370        __struct.operator_longitude = buf.get_i32_le()?;
23371        __struct.area_ceiling = buf.get_f32_le()?;
23372        __struct.area_floor = buf.get_f32_le()?;
23373        __struct.operator_altitude_geo = buf.get_f32_le()?;
23374        __struct.timestamp = buf.get_u32_le()?;
23375        __struct.area_count = buf.get_u16_le()?;
23376        __struct.area_radius = buf.get_u16_le()?;
23377        __struct.target_system = buf.get_u8()?;
23378        __struct.target_component = buf.get_u8()?;
23379        for v in &mut __struct.id_or_mac {
23380            let val = buf.get_u8()?;
23381            *v = val;
23382        }
23383        let tmp = buf.get_u8()?;
23384        __struct.operator_location_type =
23385            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23386                enum_type: "MavOdidOperatorLocationType",
23387                value: tmp as u64,
23388            })?;
23389        let tmp = buf.get_u8()?;
23390        __struct.classification_type =
23391            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23392                enum_type: "MavOdidClassificationType",
23393                value: tmp as u64,
23394            })?;
23395        let tmp = buf.get_u8()?;
23396        __struct.category_eu =
23397            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23398                enum_type: "MavOdidCategoryEu",
23399                value: tmp as u64,
23400            })?;
23401        let tmp = buf.get_u8()?;
23402        __struct.class_eu =
23403            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23404                enum_type: "MavOdidClassEu",
23405                value: tmp as u64,
23406            })?;
23407        Ok(__struct)
23408    }
23409    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23410        let mut __tmp = BytesMut::new(bytes);
23411        #[allow(clippy::absurd_extreme_comparisons)]
23412        #[allow(unused_comparisons)]
23413        if __tmp.remaining() < Self::ENCODED_LEN {
23414            panic!(
23415                "buffer is too small (need {} bytes, but got {})",
23416                Self::ENCODED_LEN,
23417                __tmp.remaining(),
23418            )
23419        }
23420        __tmp.put_i32_le(self.operator_latitude);
23421        __tmp.put_i32_le(self.operator_longitude);
23422        __tmp.put_f32_le(self.area_ceiling);
23423        __tmp.put_f32_le(self.area_floor);
23424        __tmp.put_f32_le(self.operator_altitude_geo);
23425        __tmp.put_u32_le(self.timestamp);
23426        __tmp.put_u16_le(self.area_count);
23427        __tmp.put_u16_le(self.area_radius);
23428        __tmp.put_u8(self.target_system);
23429        __tmp.put_u8(self.target_component);
23430        for val in &self.id_or_mac {
23431            __tmp.put_u8(*val);
23432        }
23433        __tmp.put_u8(self.operator_location_type as u8);
23434        __tmp.put_u8(self.classification_type as u8);
23435        __tmp.put_u8(self.category_eu as u8);
23436        __tmp.put_u8(self.class_eu as u8);
23437        if matches!(version, MavlinkVersion::V2) {
23438            let len = __tmp.len();
23439            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23440        } else {
23441            __tmp.len()
23442        }
23443    }
23444}
23445#[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
23446#[doc = ""]
23447#[doc = "ID: 12919"]
23448#[derive(Debug, Clone, PartialEq)]
23449#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23450#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23451#[cfg_attr(feature = "ts", derive(TS))]
23452#[cfg_attr(feature = "ts", ts(export))]
23453pub struct OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
23454    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
23455    pub operator_latitude: i32,
23456    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
23457    pub operator_longitude: i32,
23458    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
23459    pub operator_altitude_geo: f32,
23460    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
23461    pub timestamp: u32,
23462    #[doc = "System ID (0 for broadcast)."]
23463    pub target_system: u8,
23464    #[doc = "Component ID (0 for broadcast)."]
23465    pub target_component: u8,
23466}
23467impl OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
23468    pub const ENCODED_LEN: usize = 18usize;
23469    pub const DEFAULT: Self = Self {
23470        operator_latitude: 0_i32,
23471        operator_longitude: 0_i32,
23472        operator_altitude_geo: 0.0_f32,
23473        timestamp: 0_u32,
23474        target_system: 0_u8,
23475        target_component: 0_u8,
23476    };
23477    #[cfg(feature = "arbitrary")]
23478    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23479        use arbitrary::{Arbitrary, Unstructured};
23480        let mut buf = [0u8; 1024];
23481        rng.fill_bytes(&mut buf);
23482        let mut unstructured = Unstructured::new(&buf);
23483        Self::arbitrary(&mut unstructured).unwrap_or_default()
23484    }
23485}
23486impl Default for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
23487    fn default() -> Self {
23488        Self::DEFAULT.clone()
23489    }
23490}
23491impl MessageData for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
23492    type Message = MavMessage;
23493    const ID: u32 = 12919u32;
23494    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM_UPDATE";
23495    const EXTRA_CRC: u8 = 7u8;
23496    const ENCODED_LEN: usize = 18usize;
23497    fn deser(
23498        _version: MavlinkVersion,
23499        __input: &[u8],
23500    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23501        let avail_len = __input.len();
23502        let mut payload_buf = [0; Self::ENCODED_LEN];
23503        let mut buf = if avail_len < Self::ENCODED_LEN {
23504            payload_buf[0..avail_len].copy_from_slice(__input);
23505            Bytes::new(&payload_buf)
23506        } else {
23507            Bytes::new(__input)
23508        };
23509        let mut __struct = Self::default();
23510        __struct.operator_latitude = buf.get_i32_le()?;
23511        __struct.operator_longitude = buf.get_i32_le()?;
23512        __struct.operator_altitude_geo = buf.get_f32_le()?;
23513        __struct.timestamp = buf.get_u32_le()?;
23514        __struct.target_system = buf.get_u8()?;
23515        __struct.target_component = buf.get_u8()?;
23516        Ok(__struct)
23517    }
23518    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23519        let mut __tmp = BytesMut::new(bytes);
23520        #[allow(clippy::absurd_extreme_comparisons)]
23521        #[allow(unused_comparisons)]
23522        if __tmp.remaining() < Self::ENCODED_LEN {
23523            panic!(
23524                "buffer is too small (need {} bytes, but got {})",
23525                Self::ENCODED_LEN,
23526                __tmp.remaining(),
23527            )
23528        }
23529        __tmp.put_i32_le(self.operator_latitude);
23530        __tmp.put_i32_le(self.operator_longitude);
23531        __tmp.put_f32_le(self.operator_altitude_geo);
23532        __tmp.put_u32_le(self.timestamp);
23533        __tmp.put_u8(self.target_system);
23534        __tmp.put_u8(self.target_component);
23535        if matches!(version, MavlinkVersion::V2) {
23536            let len = __tmp.len();
23537            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23538        } else {
23539            __tmp.len()
23540        }
23541    }
23542}
23543#[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
23544#[doc = ""]
23545#[doc = "ID: 100"]
23546#[derive(Debug, Clone, PartialEq)]
23547#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23548#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23549#[cfg_attr(feature = "ts", derive(TS))]
23550#[cfg_attr(feature = "ts", ts(export))]
23551pub struct OPTICAL_FLOW_DATA {
23552    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23553    pub time_usec: u64,
23554    #[doc = "Flow in x-sensor direction, angular-speed compensated"]
23555    pub flow_comp_m_x: f32,
23556    #[doc = "Flow in y-sensor direction, angular-speed compensated"]
23557    pub flow_comp_m_y: f32,
23558    #[doc = "Ground distance. Positive value: distance known. Negative value: Unknown distance"]
23559    pub ground_distance: f32,
23560    #[doc = "Flow in x-sensor direction"]
23561    pub flow_x: i16,
23562    #[doc = "Flow in y-sensor direction"]
23563    pub flow_y: i16,
23564    #[doc = "Sensor ID"]
23565    pub sensor_id: u8,
23566    #[doc = "Optical flow quality / confidence. 0: bad, 255: maximum quality"]
23567    pub quality: u8,
23568    #[doc = "Flow rate about X axis"]
23569    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23570    pub flow_rate_x: f32,
23571    #[doc = "Flow rate about Y axis"]
23572    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23573    pub flow_rate_y: f32,
23574}
23575impl OPTICAL_FLOW_DATA {
23576    pub const ENCODED_LEN: usize = 34usize;
23577    pub const DEFAULT: Self = Self {
23578        time_usec: 0_u64,
23579        flow_comp_m_x: 0.0_f32,
23580        flow_comp_m_y: 0.0_f32,
23581        ground_distance: 0.0_f32,
23582        flow_x: 0_i16,
23583        flow_y: 0_i16,
23584        sensor_id: 0_u8,
23585        quality: 0_u8,
23586        flow_rate_x: 0.0_f32,
23587        flow_rate_y: 0.0_f32,
23588    };
23589    #[cfg(feature = "arbitrary")]
23590    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23591        use arbitrary::{Arbitrary, Unstructured};
23592        let mut buf = [0u8; 1024];
23593        rng.fill_bytes(&mut buf);
23594        let mut unstructured = Unstructured::new(&buf);
23595        Self::arbitrary(&mut unstructured).unwrap_or_default()
23596    }
23597}
23598impl Default for OPTICAL_FLOW_DATA {
23599    fn default() -> Self {
23600        Self::DEFAULT.clone()
23601    }
23602}
23603impl MessageData for OPTICAL_FLOW_DATA {
23604    type Message = MavMessage;
23605    const ID: u32 = 100u32;
23606    const NAME: &'static str = "OPTICAL_FLOW";
23607    const EXTRA_CRC: u8 = 175u8;
23608    const ENCODED_LEN: usize = 34usize;
23609    fn deser(
23610        _version: MavlinkVersion,
23611        __input: &[u8],
23612    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23613        let avail_len = __input.len();
23614        let mut payload_buf = [0; Self::ENCODED_LEN];
23615        let mut buf = if avail_len < Self::ENCODED_LEN {
23616            payload_buf[0..avail_len].copy_from_slice(__input);
23617            Bytes::new(&payload_buf)
23618        } else {
23619            Bytes::new(__input)
23620        };
23621        let mut __struct = Self::default();
23622        __struct.time_usec = buf.get_u64_le()?;
23623        __struct.flow_comp_m_x = buf.get_f32_le()?;
23624        __struct.flow_comp_m_y = buf.get_f32_le()?;
23625        __struct.ground_distance = buf.get_f32_le()?;
23626        __struct.flow_x = buf.get_i16_le()?;
23627        __struct.flow_y = buf.get_i16_le()?;
23628        __struct.sensor_id = buf.get_u8()?;
23629        __struct.quality = buf.get_u8()?;
23630        __struct.flow_rate_x = buf.get_f32_le()?;
23631        __struct.flow_rate_y = buf.get_f32_le()?;
23632        Ok(__struct)
23633    }
23634    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23635        let mut __tmp = BytesMut::new(bytes);
23636        #[allow(clippy::absurd_extreme_comparisons)]
23637        #[allow(unused_comparisons)]
23638        if __tmp.remaining() < Self::ENCODED_LEN {
23639            panic!(
23640                "buffer is too small (need {} bytes, but got {})",
23641                Self::ENCODED_LEN,
23642                __tmp.remaining(),
23643            )
23644        }
23645        __tmp.put_u64_le(self.time_usec);
23646        __tmp.put_f32_le(self.flow_comp_m_x);
23647        __tmp.put_f32_le(self.flow_comp_m_y);
23648        __tmp.put_f32_le(self.ground_distance);
23649        __tmp.put_i16_le(self.flow_x);
23650        __tmp.put_i16_le(self.flow_y);
23651        __tmp.put_u8(self.sensor_id);
23652        __tmp.put_u8(self.quality);
23653        if matches!(version, MavlinkVersion::V2) {
23654            __tmp.put_f32_le(self.flow_rate_x);
23655            __tmp.put_f32_le(self.flow_rate_y);
23656            let len = __tmp.len();
23657            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23658        } else {
23659            __tmp.len()
23660        }
23661    }
23662}
23663#[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
23664#[doc = ""]
23665#[doc = "ID: 106"]
23666#[derive(Debug, Clone, PartialEq)]
23667#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23668#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23669#[cfg_attr(feature = "ts", derive(TS))]
23670#[cfg_attr(feature = "ts", ts(export))]
23671pub struct OPTICAL_FLOW_RAD_DATA {
23672    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23673    pub time_usec: u64,
23674    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
23675    pub integration_time_us: u32,
23676    #[doc = "Flow around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
23677    pub integrated_x: f32,
23678    #[doc = "Flow around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
23679    pub integrated_y: f32,
23680    #[doc = "RH rotation around X axis"]
23681    pub integrated_xgyro: f32,
23682    #[doc = "RH rotation around Y axis"]
23683    pub integrated_ygyro: f32,
23684    #[doc = "RH rotation around Z axis"]
23685    pub integrated_zgyro: f32,
23686    #[doc = "Time since the distance was sampled."]
23687    pub time_delta_distance_us: u32,
23688    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
23689    pub distance: f32,
23690    #[doc = "Temperature"]
23691    pub temperature: i16,
23692    #[doc = "Sensor ID"]
23693    pub sensor_id: u8,
23694    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
23695    pub quality: u8,
23696}
23697impl OPTICAL_FLOW_RAD_DATA {
23698    pub const ENCODED_LEN: usize = 44usize;
23699    pub const DEFAULT: Self = Self {
23700        time_usec: 0_u64,
23701        integration_time_us: 0_u32,
23702        integrated_x: 0.0_f32,
23703        integrated_y: 0.0_f32,
23704        integrated_xgyro: 0.0_f32,
23705        integrated_ygyro: 0.0_f32,
23706        integrated_zgyro: 0.0_f32,
23707        time_delta_distance_us: 0_u32,
23708        distance: 0.0_f32,
23709        temperature: 0_i16,
23710        sensor_id: 0_u8,
23711        quality: 0_u8,
23712    };
23713    #[cfg(feature = "arbitrary")]
23714    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23715        use arbitrary::{Arbitrary, Unstructured};
23716        let mut buf = [0u8; 1024];
23717        rng.fill_bytes(&mut buf);
23718        let mut unstructured = Unstructured::new(&buf);
23719        Self::arbitrary(&mut unstructured).unwrap_or_default()
23720    }
23721}
23722impl Default for OPTICAL_FLOW_RAD_DATA {
23723    fn default() -> Self {
23724        Self::DEFAULT.clone()
23725    }
23726}
23727impl MessageData for OPTICAL_FLOW_RAD_DATA {
23728    type Message = MavMessage;
23729    const ID: u32 = 106u32;
23730    const NAME: &'static str = "OPTICAL_FLOW_RAD";
23731    const EXTRA_CRC: u8 = 138u8;
23732    const ENCODED_LEN: usize = 44usize;
23733    fn deser(
23734        _version: MavlinkVersion,
23735        __input: &[u8],
23736    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23737        let avail_len = __input.len();
23738        let mut payload_buf = [0; Self::ENCODED_LEN];
23739        let mut buf = if avail_len < Self::ENCODED_LEN {
23740            payload_buf[0..avail_len].copy_from_slice(__input);
23741            Bytes::new(&payload_buf)
23742        } else {
23743            Bytes::new(__input)
23744        };
23745        let mut __struct = Self::default();
23746        __struct.time_usec = buf.get_u64_le()?;
23747        __struct.integration_time_us = buf.get_u32_le()?;
23748        __struct.integrated_x = buf.get_f32_le()?;
23749        __struct.integrated_y = buf.get_f32_le()?;
23750        __struct.integrated_xgyro = buf.get_f32_le()?;
23751        __struct.integrated_ygyro = buf.get_f32_le()?;
23752        __struct.integrated_zgyro = buf.get_f32_le()?;
23753        __struct.time_delta_distance_us = buf.get_u32_le()?;
23754        __struct.distance = buf.get_f32_le()?;
23755        __struct.temperature = buf.get_i16_le()?;
23756        __struct.sensor_id = buf.get_u8()?;
23757        __struct.quality = buf.get_u8()?;
23758        Ok(__struct)
23759    }
23760    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23761        let mut __tmp = BytesMut::new(bytes);
23762        #[allow(clippy::absurd_extreme_comparisons)]
23763        #[allow(unused_comparisons)]
23764        if __tmp.remaining() < Self::ENCODED_LEN {
23765            panic!(
23766                "buffer is too small (need {} bytes, but got {})",
23767                Self::ENCODED_LEN,
23768                __tmp.remaining(),
23769            )
23770        }
23771        __tmp.put_u64_le(self.time_usec);
23772        __tmp.put_u32_le(self.integration_time_us);
23773        __tmp.put_f32_le(self.integrated_x);
23774        __tmp.put_f32_le(self.integrated_y);
23775        __tmp.put_f32_le(self.integrated_xgyro);
23776        __tmp.put_f32_le(self.integrated_ygyro);
23777        __tmp.put_f32_le(self.integrated_zgyro);
23778        __tmp.put_u32_le(self.time_delta_distance_us);
23779        __tmp.put_f32_le(self.distance);
23780        __tmp.put_i16_le(self.temperature);
23781        __tmp.put_u8(self.sensor_id);
23782        __tmp.put_u8(self.quality);
23783        if matches!(version, MavlinkVersion::V2) {
23784            let len = __tmp.len();
23785            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23786        } else {
23787            __tmp.len()
23788        }
23789    }
23790}
23791#[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
23792#[doc = ""]
23793#[doc = "ID: 360"]
23794#[derive(Debug, Clone, PartialEq)]
23795#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23796#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23797#[cfg_attr(feature = "ts", derive(TS))]
23798#[cfg_attr(feature = "ts", ts(export))]
23799pub struct ORBIT_EXECUTION_STATUS_DATA {
23800    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23801    pub time_usec: u64,
23802    #[doc = "Radius of the orbit circle. Positive values orbit clockwise, negative values orbit counter-clockwise."]
23803    pub radius: f32,
23804    #[doc = "X coordinate of center point. Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
23805    pub x: i32,
23806    #[doc = "Y coordinate of center point.  Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
23807    pub y: i32,
23808    #[doc = "Altitude of center point. Coordinate system depends on frame field."]
23809    pub z: f32,
23810    #[doc = "The coordinate system of the fields: x, y, z."]
23811    pub frame: MavFrame,
23812}
23813impl ORBIT_EXECUTION_STATUS_DATA {
23814    pub const ENCODED_LEN: usize = 25usize;
23815    pub const DEFAULT: Self = Self {
23816        time_usec: 0_u64,
23817        radius: 0.0_f32,
23818        x: 0_i32,
23819        y: 0_i32,
23820        z: 0.0_f32,
23821        frame: MavFrame::DEFAULT,
23822    };
23823    #[cfg(feature = "arbitrary")]
23824    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23825        use arbitrary::{Arbitrary, Unstructured};
23826        let mut buf = [0u8; 1024];
23827        rng.fill_bytes(&mut buf);
23828        let mut unstructured = Unstructured::new(&buf);
23829        Self::arbitrary(&mut unstructured).unwrap_or_default()
23830    }
23831}
23832impl Default for ORBIT_EXECUTION_STATUS_DATA {
23833    fn default() -> Self {
23834        Self::DEFAULT.clone()
23835    }
23836}
23837impl MessageData for ORBIT_EXECUTION_STATUS_DATA {
23838    type Message = MavMessage;
23839    const ID: u32 = 360u32;
23840    const NAME: &'static str = "ORBIT_EXECUTION_STATUS";
23841    const EXTRA_CRC: u8 = 11u8;
23842    const ENCODED_LEN: usize = 25usize;
23843    fn deser(
23844        _version: MavlinkVersion,
23845        __input: &[u8],
23846    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23847        let avail_len = __input.len();
23848        let mut payload_buf = [0; Self::ENCODED_LEN];
23849        let mut buf = if avail_len < Self::ENCODED_LEN {
23850            payload_buf[0..avail_len].copy_from_slice(__input);
23851            Bytes::new(&payload_buf)
23852        } else {
23853            Bytes::new(__input)
23854        };
23855        let mut __struct = Self::default();
23856        __struct.time_usec = buf.get_u64_le()?;
23857        __struct.radius = buf.get_f32_le()?;
23858        __struct.x = buf.get_i32_le()?;
23859        __struct.y = buf.get_i32_le()?;
23860        __struct.z = buf.get_f32_le()?;
23861        let tmp = buf.get_u8()?;
23862        __struct.frame =
23863            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23864                enum_type: "MavFrame",
23865                value: tmp as u64,
23866            })?;
23867        Ok(__struct)
23868    }
23869    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23870        let mut __tmp = BytesMut::new(bytes);
23871        #[allow(clippy::absurd_extreme_comparisons)]
23872        #[allow(unused_comparisons)]
23873        if __tmp.remaining() < Self::ENCODED_LEN {
23874            panic!(
23875                "buffer is too small (need {} bytes, but got {})",
23876                Self::ENCODED_LEN,
23877                __tmp.remaining(),
23878            )
23879        }
23880        __tmp.put_u64_le(self.time_usec);
23881        __tmp.put_f32_le(self.radius);
23882        __tmp.put_i32_le(self.x);
23883        __tmp.put_i32_le(self.y);
23884        __tmp.put_f32_le(self.z);
23885        __tmp.put_u8(self.frame as u8);
23886        if matches!(version, MavlinkVersion::V2) {
23887            let len = __tmp.len();
23888            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23889        } else {
23890            __tmp.len()
23891        }
23892    }
23893}
23894#[doc = "Response from a PARAM_EXT_SET message."]
23895#[doc = ""]
23896#[doc = "ID: 324"]
23897#[derive(Debug, Clone, PartialEq)]
23898#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23899#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23900#[cfg_attr(feature = "ts", derive(TS))]
23901#[cfg_attr(feature = "ts", ts(export))]
23902pub struct PARAM_EXT_ACK_DATA {
23903    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23904    #[cfg_attr(feature = "ts", ts(type = "string"))]
23905    pub param_id: CharArray<16>,
23906    #[doc = "Parameter value (new value if PARAM_ACK_ACCEPTED, current value otherwise)"]
23907    #[cfg_attr(feature = "ts", ts(type = "string"))]
23908    pub param_value: CharArray<128>,
23909    #[doc = "Parameter type."]
23910    pub param_type: MavParamExtType,
23911    #[doc = "Result code."]
23912    pub param_result: ParamAck,
23913}
23914impl PARAM_EXT_ACK_DATA {
23915    pub const ENCODED_LEN: usize = 146usize;
23916    pub const DEFAULT: Self = Self {
23917        param_id: CharArray::new([0_u8; 16usize]),
23918        param_value: CharArray::new([0_u8; 128usize]),
23919        param_type: MavParamExtType::DEFAULT,
23920        param_result: ParamAck::DEFAULT,
23921    };
23922    #[cfg(feature = "arbitrary")]
23923    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23924        use arbitrary::{Arbitrary, Unstructured};
23925        let mut buf = [0u8; 1024];
23926        rng.fill_bytes(&mut buf);
23927        let mut unstructured = Unstructured::new(&buf);
23928        Self::arbitrary(&mut unstructured).unwrap_or_default()
23929    }
23930}
23931impl Default for PARAM_EXT_ACK_DATA {
23932    fn default() -> Self {
23933        Self::DEFAULT.clone()
23934    }
23935}
23936impl MessageData for PARAM_EXT_ACK_DATA {
23937    type Message = MavMessage;
23938    const ID: u32 = 324u32;
23939    const NAME: &'static str = "PARAM_EXT_ACK";
23940    const EXTRA_CRC: u8 = 132u8;
23941    const ENCODED_LEN: usize = 146usize;
23942    fn deser(
23943        _version: MavlinkVersion,
23944        __input: &[u8],
23945    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23946        let avail_len = __input.len();
23947        let mut payload_buf = [0; Self::ENCODED_LEN];
23948        let mut buf = if avail_len < Self::ENCODED_LEN {
23949            payload_buf[0..avail_len].copy_from_slice(__input);
23950            Bytes::new(&payload_buf)
23951        } else {
23952            Bytes::new(__input)
23953        };
23954        let mut __struct = Self::default();
23955        let mut tmp = [0_u8; 16usize];
23956        for v in &mut tmp {
23957            *v = buf.get_u8()?;
23958        }
23959        __struct.param_id = CharArray::new(tmp);
23960        let mut tmp = [0_u8; 128usize];
23961        for v in &mut tmp {
23962            *v = buf.get_u8()?;
23963        }
23964        __struct.param_value = CharArray::new(tmp);
23965        let tmp = buf.get_u8()?;
23966        __struct.param_type =
23967            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23968                enum_type: "MavParamExtType",
23969                value: tmp as u64,
23970            })?;
23971        let tmp = buf.get_u8()?;
23972        __struct.param_result =
23973            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23974                enum_type: "ParamAck",
23975                value: tmp as u64,
23976            })?;
23977        Ok(__struct)
23978    }
23979    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23980        let mut __tmp = BytesMut::new(bytes);
23981        #[allow(clippy::absurd_extreme_comparisons)]
23982        #[allow(unused_comparisons)]
23983        if __tmp.remaining() < Self::ENCODED_LEN {
23984            panic!(
23985                "buffer is too small (need {} bytes, but got {})",
23986                Self::ENCODED_LEN,
23987                __tmp.remaining(),
23988            )
23989        }
23990        for val in &self.param_id {
23991            __tmp.put_u8(*val);
23992        }
23993        for val in &self.param_value {
23994            __tmp.put_u8(*val);
23995        }
23996        __tmp.put_u8(self.param_type as u8);
23997        __tmp.put_u8(self.param_result as u8);
23998        if matches!(version, MavlinkVersion::V2) {
23999            let len = __tmp.len();
24000            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24001        } else {
24002            __tmp.len()
24003        }
24004    }
24005}
24006#[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
24007#[doc = ""]
24008#[doc = "ID: 321"]
24009#[derive(Debug, Clone, PartialEq)]
24010#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24011#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24012#[cfg_attr(feature = "ts", derive(TS))]
24013#[cfg_attr(feature = "ts", ts(export))]
24014pub struct PARAM_EXT_REQUEST_LIST_DATA {
24015    #[doc = "System ID"]
24016    pub target_system: u8,
24017    #[doc = "Component ID"]
24018    pub target_component: u8,
24019}
24020impl PARAM_EXT_REQUEST_LIST_DATA {
24021    pub const ENCODED_LEN: usize = 2usize;
24022    pub const DEFAULT: Self = Self {
24023        target_system: 0_u8,
24024        target_component: 0_u8,
24025    };
24026    #[cfg(feature = "arbitrary")]
24027    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24028        use arbitrary::{Arbitrary, Unstructured};
24029        let mut buf = [0u8; 1024];
24030        rng.fill_bytes(&mut buf);
24031        let mut unstructured = Unstructured::new(&buf);
24032        Self::arbitrary(&mut unstructured).unwrap_or_default()
24033    }
24034}
24035impl Default for PARAM_EXT_REQUEST_LIST_DATA {
24036    fn default() -> Self {
24037        Self::DEFAULT.clone()
24038    }
24039}
24040impl MessageData for PARAM_EXT_REQUEST_LIST_DATA {
24041    type Message = MavMessage;
24042    const ID: u32 = 321u32;
24043    const NAME: &'static str = "PARAM_EXT_REQUEST_LIST";
24044    const EXTRA_CRC: u8 = 88u8;
24045    const ENCODED_LEN: usize = 2usize;
24046    fn deser(
24047        _version: MavlinkVersion,
24048        __input: &[u8],
24049    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24050        let avail_len = __input.len();
24051        let mut payload_buf = [0; Self::ENCODED_LEN];
24052        let mut buf = if avail_len < Self::ENCODED_LEN {
24053            payload_buf[0..avail_len].copy_from_slice(__input);
24054            Bytes::new(&payload_buf)
24055        } else {
24056            Bytes::new(__input)
24057        };
24058        let mut __struct = Self::default();
24059        __struct.target_system = buf.get_u8()?;
24060        __struct.target_component = buf.get_u8()?;
24061        Ok(__struct)
24062    }
24063    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24064        let mut __tmp = BytesMut::new(bytes);
24065        #[allow(clippy::absurd_extreme_comparisons)]
24066        #[allow(unused_comparisons)]
24067        if __tmp.remaining() < Self::ENCODED_LEN {
24068            panic!(
24069                "buffer is too small (need {} bytes, but got {})",
24070                Self::ENCODED_LEN,
24071                __tmp.remaining(),
24072            )
24073        }
24074        __tmp.put_u8(self.target_system);
24075        __tmp.put_u8(self.target_component);
24076        if matches!(version, MavlinkVersion::V2) {
24077            let len = __tmp.len();
24078            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24079        } else {
24080            __tmp.len()
24081        }
24082    }
24083}
24084#[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
24085#[doc = ""]
24086#[doc = "ID: 320"]
24087#[derive(Debug, Clone, PartialEq)]
24088#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24089#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24090#[cfg_attr(feature = "ts", derive(TS))]
24091#[cfg_attr(feature = "ts", ts(export))]
24092pub struct PARAM_EXT_REQUEST_READ_DATA {
24093    #[doc = "Parameter index. Set to -1 to use the Parameter ID field as identifier (else param_id will be ignored)"]
24094    pub param_index: i16,
24095    #[doc = "System ID"]
24096    pub target_system: u8,
24097    #[doc = "Component ID"]
24098    pub target_component: u8,
24099    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24100    #[cfg_attr(feature = "ts", ts(type = "string"))]
24101    pub param_id: CharArray<16>,
24102}
24103impl PARAM_EXT_REQUEST_READ_DATA {
24104    pub const ENCODED_LEN: usize = 20usize;
24105    pub const DEFAULT: Self = Self {
24106        param_index: 0_i16,
24107        target_system: 0_u8,
24108        target_component: 0_u8,
24109        param_id: CharArray::new([0_u8; 16usize]),
24110    };
24111    #[cfg(feature = "arbitrary")]
24112    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24113        use arbitrary::{Arbitrary, Unstructured};
24114        let mut buf = [0u8; 1024];
24115        rng.fill_bytes(&mut buf);
24116        let mut unstructured = Unstructured::new(&buf);
24117        Self::arbitrary(&mut unstructured).unwrap_or_default()
24118    }
24119}
24120impl Default for PARAM_EXT_REQUEST_READ_DATA {
24121    fn default() -> Self {
24122        Self::DEFAULT.clone()
24123    }
24124}
24125impl MessageData for PARAM_EXT_REQUEST_READ_DATA {
24126    type Message = MavMessage;
24127    const ID: u32 = 320u32;
24128    const NAME: &'static str = "PARAM_EXT_REQUEST_READ";
24129    const EXTRA_CRC: u8 = 243u8;
24130    const ENCODED_LEN: usize = 20usize;
24131    fn deser(
24132        _version: MavlinkVersion,
24133        __input: &[u8],
24134    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24135        let avail_len = __input.len();
24136        let mut payload_buf = [0; Self::ENCODED_LEN];
24137        let mut buf = if avail_len < Self::ENCODED_LEN {
24138            payload_buf[0..avail_len].copy_from_slice(__input);
24139            Bytes::new(&payload_buf)
24140        } else {
24141            Bytes::new(__input)
24142        };
24143        let mut __struct = Self::default();
24144        __struct.param_index = buf.get_i16_le()?;
24145        __struct.target_system = buf.get_u8()?;
24146        __struct.target_component = buf.get_u8()?;
24147        let mut tmp = [0_u8; 16usize];
24148        for v in &mut tmp {
24149            *v = buf.get_u8()?;
24150        }
24151        __struct.param_id = CharArray::new(tmp);
24152        Ok(__struct)
24153    }
24154    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24155        let mut __tmp = BytesMut::new(bytes);
24156        #[allow(clippy::absurd_extreme_comparisons)]
24157        #[allow(unused_comparisons)]
24158        if __tmp.remaining() < Self::ENCODED_LEN {
24159            panic!(
24160                "buffer is too small (need {} bytes, but got {})",
24161                Self::ENCODED_LEN,
24162                __tmp.remaining(),
24163            )
24164        }
24165        __tmp.put_i16_le(self.param_index);
24166        __tmp.put_u8(self.target_system);
24167        __tmp.put_u8(self.target_component);
24168        for val in &self.param_id {
24169            __tmp.put_u8(*val);
24170        }
24171        if matches!(version, MavlinkVersion::V2) {
24172            let len = __tmp.len();
24173            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24174        } else {
24175            __tmp.len()
24176        }
24177    }
24178}
24179#[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
24180#[doc = ""]
24181#[doc = "ID: 323"]
24182#[derive(Debug, Clone, PartialEq)]
24183#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24184#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24185#[cfg_attr(feature = "ts", derive(TS))]
24186#[cfg_attr(feature = "ts", ts(export))]
24187pub struct PARAM_EXT_SET_DATA {
24188    #[doc = "System ID"]
24189    pub target_system: u8,
24190    #[doc = "Component ID"]
24191    pub target_component: u8,
24192    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24193    #[cfg_attr(feature = "ts", ts(type = "string"))]
24194    pub param_id: CharArray<16>,
24195    #[doc = "Parameter value"]
24196    #[cfg_attr(feature = "ts", ts(type = "string"))]
24197    pub param_value: CharArray<128>,
24198    #[doc = "Parameter type."]
24199    pub param_type: MavParamExtType,
24200}
24201impl PARAM_EXT_SET_DATA {
24202    pub const ENCODED_LEN: usize = 147usize;
24203    pub const DEFAULT: Self = Self {
24204        target_system: 0_u8,
24205        target_component: 0_u8,
24206        param_id: CharArray::new([0_u8; 16usize]),
24207        param_value: CharArray::new([0_u8; 128usize]),
24208        param_type: MavParamExtType::DEFAULT,
24209    };
24210    #[cfg(feature = "arbitrary")]
24211    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24212        use arbitrary::{Arbitrary, Unstructured};
24213        let mut buf = [0u8; 1024];
24214        rng.fill_bytes(&mut buf);
24215        let mut unstructured = Unstructured::new(&buf);
24216        Self::arbitrary(&mut unstructured).unwrap_or_default()
24217    }
24218}
24219impl Default for PARAM_EXT_SET_DATA {
24220    fn default() -> Self {
24221        Self::DEFAULT.clone()
24222    }
24223}
24224impl MessageData for PARAM_EXT_SET_DATA {
24225    type Message = MavMessage;
24226    const ID: u32 = 323u32;
24227    const NAME: &'static str = "PARAM_EXT_SET";
24228    const EXTRA_CRC: u8 = 78u8;
24229    const ENCODED_LEN: usize = 147usize;
24230    fn deser(
24231        _version: MavlinkVersion,
24232        __input: &[u8],
24233    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24234        let avail_len = __input.len();
24235        let mut payload_buf = [0; Self::ENCODED_LEN];
24236        let mut buf = if avail_len < Self::ENCODED_LEN {
24237            payload_buf[0..avail_len].copy_from_slice(__input);
24238            Bytes::new(&payload_buf)
24239        } else {
24240            Bytes::new(__input)
24241        };
24242        let mut __struct = Self::default();
24243        __struct.target_system = buf.get_u8()?;
24244        __struct.target_component = buf.get_u8()?;
24245        let mut tmp = [0_u8; 16usize];
24246        for v in &mut tmp {
24247            *v = buf.get_u8()?;
24248        }
24249        __struct.param_id = CharArray::new(tmp);
24250        let mut tmp = [0_u8; 128usize];
24251        for v in &mut tmp {
24252            *v = buf.get_u8()?;
24253        }
24254        __struct.param_value = CharArray::new(tmp);
24255        let tmp = buf.get_u8()?;
24256        __struct.param_type =
24257            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24258                enum_type: "MavParamExtType",
24259                value: tmp as u64,
24260            })?;
24261        Ok(__struct)
24262    }
24263    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24264        let mut __tmp = BytesMut::new(bytes);
24265        #[allow(clippy::absurd_extreme_comparisons)]
24266        #[allow(unused_comparisons)]
24267        if __tmp.remaining() < Self::ENCODED_LEN {
24268            panic!(
24269                "buffer is too small (need {} bytes, but got {})",
24270                Self::ENCODED_LEN,
24271                __tmp.remaining(),
24272            )
24273        }
24274        __tmp.put_u8(self.target_system);
24275        __tmp.put_u8(self.target_component);
24276        for val in &self.param_id {
24277            __tmp.put_u8(*val);
24278        }
24279        for val in &self.param_value {
24280            __tmp.put_u8(*val);
24281        }
24282        __tmp.put_u8(self.param_type as u8);
24283        if matches!(version, MavlinkVersion::V2) {
24284            let len = __tmp.len();
24285            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24286        } else {
24287            __tmp.len()
24288        }
24289    }
24290}
24291#[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
24292#[doc = ""]
24293#[doc = "ID: 322"]
24294#[derive(Debug, Clone, PartialEq)]
24295#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24296#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24297#[cfg_attr(feature = "ts", derive(TS))]
24298#[cfg_attr(feature = "ts", ts(export))]
24299pub struct PARAM_EXT_VALUE_DATA {
24300    #[doc = "Total number of parameters"]
24301    pub param_count: u16,
24302    #[doc = "Index of this parameter"]
24303    pub param_index: u16,
24304    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24305    #[cfg_attr(feature = "ts", ts(type = "string"))]
24306    pub param_id: CharArray<16>,
24307    #[doc = "Parameter value"]
24308    #[cfg_attr(feature = "ts", ts(type = "string"))]
24309    pub param_value: CharArray<128>,
24310    #[doc = "Parameter type."]
24311    pub param_type: MavParamExtType,
24312}
24313impl PARAM_EXT_VALUE_DATA {
24314    pub const ENCODED_LEN: usize = 149usize;
24315    pub const DEFAULT: Self = Self {
24316        param_count: 0_u16,
24317        param_index: 0_u16,
24318        param_id: CharArray::new([0_u8; 16usize]),
24319        param_value: CharArray::new([0_u8; 128usize]),
24320        param_type: MavParamExtType::DEFAULT,
24321    };
24322    #[cfg(feature = "arbitrary")]
24323    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24324        use arbitrary::{Arbitrary, Unstructured};
24325        let mut buf = [0u8; 1024];
24326        rng.fill_bytes(&mut buf);
24327        let mut unstructured = Unstructured::new(&buf);
24328        Self::arbitrary(&mut unstructured).unwrap_or_default()
24329    }
24330}
24331impl Default for PARAM_EXT_VALUE_DATA {
24332    fn default() -> Self {
24333        Self::DEFAULT.clone()
24334    }
24335}
24336impl MessageData for PARAM_EXT_VALUE_DATA {
24337    type Message = MavMessage;
24338    const ID: u32 = 322u32;
24339    const NAME: &'static str = "PARAM_EXT_VALUE";
24340    const EXTRA_CRC: u8 = 243u8;
24341    const ENCODED_LEN: usize = 149usize;
24342    fn deser(
24343        _version: MavlinkVersion,
24344        __input: &[u8],
24345    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24346        let avail_len = __input.len();
24347        let mut payload_buf = [0; Self::ENCODED_LEN];
24348        let mut buf = if avail_len < Self::ENCODED_LEN {
24349            payload_buf[0..avail_len].copy_from_slice(__input);
24350            Bytes::new(&payload_buf)
24351        } else {
24352            Bytes::new(__input)
24353        };
24354        let mut __struct = Self::default();
24355        __struct.param_count = buf.get_u16_le()?;
24356        __struct.param_index = buf.get_u16_le()?;
24357        let mut tmp = [0_u8; 16usize];
24358        for v in &mut tmp {
24359            *v = buf.get_u8()?;
24360        }
24361        __struct.param_id = CharArray::new(tmp);
24362        let mut tmp = [0_u8; 128usize];
24363        for v in &mut tmp {
24364            *v = buf.get_u8()?;
24365        }
24366        __struct.param_value = CharArray::new(tmp);
24367        let tmp = buf.get_u8()?;
24368        __struct.param_type =
24369            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24370                enum_type: "MavParamExtType",
24371                value: tmp as u64,
24372            })?;
24373        Ok(__struct)
24374    }
24375    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24376        let mut __tmp = BytesMut::new(bytes);
24377        #[allow(clippy::absurd_extreme_comparisons)]
24378        #[allow(unused_comparisons)]
24379        if __tmp.remaining() < Self::ENCODED_LEN {
24380            panic!(
24381                "buffer is too small (need {} bytes, but got {})",
24382                Self::ENCODED_LEN,
24383                __tmp.remaining(),
24384            )
24385        }
24386        __tmp.put_u16_le(self.param_count);
24387        __tmp.put_u16_le(self.param_index);
24388        for val in &self.param_id {
24389            __tmp.put_u8(*val);
24390        }
24391        for val in &self.param_value {
24392            __tmp.put_u8(*val);
24393        }
24394        __tmp.put_u8(self.param_type as u8);
24395        if matches!(version, MavlinkVersion::V2) {
24396            let len = __tmp.len();
24397            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24398        } else {
24399            __tmp.len()
24400        }
24401    }
24402}
24403#[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
24404#[doc = ""]
24405#[doc = "ID: 50"]
24406#[derive(Debug, Clone, PartialEq)]
24407#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24408#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24409#[cfg_attr(feature = "ts", derive(TS))]
24410#[cfg_attr(feature = "ts", ts(export))]
24411pub struct PARAM_MAP_RC_DATA {
24412    #[doc = "Initial parameter value"]
24413    pub param_value0: f32,
24414    #[doc = "Scale, maps the RC range [-1, 1] to a parameter value"]
24415    pub scale: f32,
24416    #[doc = "Minimum param value. The protocol does not define if this overwrites an onboard minimum value. (Depends on implementation)"]
24417    pub param_value_min: f32,
24418    #[doc = "Maximum param value. The protocol does not define if this overwrites an onboard maximum value. (Depends on implementation)"]
24419    pub param_value_max: f32,
24420    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored), send -2 to disable any existing map for this rc_channel_index."]
24421    pub param_index: i16,
24422    #[doc = "System ID"]
24423    pub target_system: u8,
24424    #[doc = "Component ID"]
24425    pub target_component: u8,
24426    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24427    #[cfg_attr(feature = "ts", ts(type = "string"))]
24428    pub param_id: CharArray<16>,
24429    #[doc = "Index of parameter RC channel. Not equal to the RC channel id. Typically corresponds to a potentiometer-knob on the RC."]
24430    pub parameter_rc_channel_index: u8,
24431}
24432impl PARAM_MAP_RC_DATA {
24433    pub const ENCODED_LEN: usize = 37usize;
24434    pub const DEFAULT: Self = Self {
24435        param_value0: 0.0_f32,
24436        scale: 0.0_f32,
24437        param_value_min: 0.0_f32,
24438        param_value_max: 0.0_f32,
24439        param_index: 0_i16,
24440        target_system: 0_u8,
24441        target_component: 0_u8,
24442        param_id: CharArray::new([0_u8; 16usize]),
24443        parameter_rc_channel_index: 0_u8,
24444    };
24445    #[cfg(feature = "arbitrary")]
24446    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24447        use arbitrary::{Arbitrary, Unstructured};
24448        let mut buf = [0u8; 1024];
24449        rng.fill_bytes(&mut buf);
24450        let mut unstructured = Unstructured::new(&buf);
24451        Self::arbitrary(&mut unstructured).unwrap_or_default()
24452    }
24453}
24454impl Default for PARAM_MAP_RC_DATA {
24455    fn default() -> Self {
24456        Self::DEFAULT.clone()
24457    }
24458}
24459impl MessageData for PARAM_MAP_RC_DATA {
24460    type Message = MavMessage;
24461    const ID: u32 = 50u32;
24462    const NAME: &'static str = "PARAM_MAP_RC";
24463    const EXTRA_CRC: u8 = 78u8;
24464    const ENCODED_LEN: usize = 37usize;
24465    fn deser(
24466        _version: MavlinkVersion,
24467        __input: &[u8],
24468    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24469        let avail_len = __input.len();
24470        let mut payload_buf = [0; Self::ENCODED_LEN];
24471        let mut buf = if avail_len < Self::ENCODED_LEN {
24472            payload_buf[0..avail_len].copy_from_slice(__input);
24473            Bytes::new(&payload_buf)
24474        } else {
24475            Bytes::new(__input)
24476        };
24477        let mut __struct = Self::default();
24478        __struct.param_value0 = buf.get_f32_le()?;
24479        __struct.scale = buf.get_f32_le()?;
24480        __struct.param_value_min = buf.get_f32_le()?;
24481        __struct.param_value_max = buf.get_f32_le()?;
24482        __struct.param_index = buf.get_i16_le()?;
24483        __struct.target_system = buf.get_u8()?;
24484        __struct.target_component = buf.get_u8()?;
24485        let mut tmp = [0_u8; 16usize];
24486        for v in &mut tmp {
24487            *v = buf.get_u8()?;
24488        }
24489        __struct.param_id = CharArray::new(tmp);
24490        __struct.parameter_rc_channel_index = buf.get_u8()?;
24491        Ok(__struct)
24492    }
24493    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24494        let mut __tmp = BytesMut::new(bytes);
24495        #[allow(clippy::absurd_extreme_comparisons)]
24496        #[allow(unused_comparisons)]
24497        if __tmp.remaining() < Self::ENCODED_LEN {
24498            panic!(
24499                "buffer is too small (need {} bytes, but got {})",
24500                Self::ENCODED_LEN,
24501                __tmp.remaining(),
24502            )
24503        }
24504        __tmp.put_f32_le(self.param_value0);
24505        __tmp.put_f32_le(self.scale);
24506        __tmp.put_f32_le(self.param_value_min);
24507        __tmp.put_f32_le(self.param_value_max);
24508        __tmp.put_i16_le(self.param_index);
24509        __tmp.put_u8(self.target_system);
24510        __tmp.put_u8(self.target_component);
24511        for val in &self.param_id {
24512            __tmp.put_u8(*val);
24513        }
24514        __tmp.put_u8(self.parameter_rc_channel_index);
24515        if matches!(version, MavlinkVersion::V2) {
24516            let len = __tmp.len();
24517            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24518        } else {
24519            __tmp.len()
24520        }
24521    }
24522}
24523#[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
24524#[doc = ""]
24525#[doc = "ID: 21"]
24526#[derive(Debug, Clone, PartialEq)]
24527#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24528#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24529#[cfg_attr(feature = "ts", derive(TS))]
24530#[cfg_attr(feature = "ts", ts(export))]
24531pub struct PARAM_REQUEST_LIST_DATA {
24532    #[doc = "System ID"]
24533    pub target_system: u8,
24534    #[doc = "Component ID"]
24535    pub target_component: u8,
24536}
24537impl PARAM_REQUEST_LIST_DATA {
24538    pub const ENCODED_LEN: usize = 2usize;
24539    pub const DEFAULT: Self = Self {
24540        target_system: 0_u8,
24541        target_component: 0_u8,
24542    };
24543    #[cfg(feature = "arbitrary")]
24544    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24545        use arbitrary::{Arbitrary, Unstructured};
24546        let mut buf = [0u8; 1024];
24547        rng.fill_bytes(&mut buf);
24548        let mut unstructured = Unstructured::new(&buf);
24549        Self::arbitrary(&mut unstructured).unwrap_or_default()
24550    }
24551}
24552impl Default for PARAM_REQUEST_LIST_DATA {
24553    fn default() -> Self {
24554        Self::DEFAULT.clone()
24555    }
24556}
24557impl MessageData for PARAM_REQUEST_LIST_DATA {
24558    type Message = MavMessage;
24559    const ID: u32 = 21u32;
24560    const NAME: &'static str = "PARAM_REQUEST_LIST";
24561    const EXTRA_CRC: u8 = 159u8;
24562    const ENCODED_LEN: usize = 2usize;
24563    fn deser(
24564        _version: MavlinkVersion,
24565        __input: &[u8],
24566    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24567        let avail_len = __input.len();
24568        let mut payload_buf = [0; Self::ENCODED_LEN];
24569        let mut buf = if avail_len < Self::ENCODED_LEN {
24570            payload_buf[0..avail_len].copy_from_slice(__input);
24571            Bytes::new(&payload_buf)
24572        } else {
24573            Bytes::new(__input)
24574        };
24575        let mut __struct = Self::default();
24576        __struct.target_system = buf.get_u8()?;
24577        __struct.target_component = buf.get_u8()?;
24578        Ok(__struct)
24579    }
24580    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24581        let mut __tmp = BytesMut::new(bytes);
24582        #[allow(clippy::absurd_extreme_comparisons)]
24583        #[allow(unused_comparisons)]
24584        if __tmp.remaining() < Self::ENCODED_LEN {
24585            panic!(
24586                "buffer is too small (need {} bytes, but got {})",
24587                Self::ENCODED_LEN,
24588                __tmp.remaining(),
24589            )
24590        }
24591        __tmp.put_u8(self.target_system);
24592        __tmp.put_u8(self.target_component);
24593        if matches!(version, MavlinkVersion::V2) {
24594            let len = __tmp.len();
24595            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24596        } else {
24597            __tmp.len()
24598        }
24599    }
24600}
24601#[doc = "value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
24602#[doc = ""]
24603#[doc = "ID: 20"]
24604#[derive(Debug, Clone, PartialEq)]
24605#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24606#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24607#[cfg_attr(feature = "ts", derive(TS))]
24608#[cfg_attr(feature = "ts", ts(export))]
24609pub struct PARAM_REQUEST_READ_DATA {
24610    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored)"]
24611    pub param_index: i16,
24612    #[doc = "System ID"]
24613    pub target_system: u8,
24614    #[doc = "Component ID"]
24615    pub target_component: u8,
24616    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24617    #[cfg_attr(feature = "ts", ts(type = "string"))]
24618    pub param_id: CharArray<16>,
24619}
24620impl PARAM_REQUEST_READ_DATA {
24621    pub const ENCODED_LEN: usize = 20usize;
24622    pub const DEFAULT: Self = Self {
24623        param_index: 0_i16,
24624        target_system: 0_u8,
24625        target_component: 0_u8,
24626        param_id: CharArray::new([0_u8; 16usize]),
24627    };
24628    #[cfg(feature = "arbitrary")]
24629    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24630        use arbitrary::{Arbitrary, Unstructured};
24631        let mut buf = [0u8; 1024];
24632        rng.fill_bytes(&mut buf);
24633        let mut unstructured = Unstructured::new(&buf);
24634        Self::arbitrary(&mut unstructured).unwrap_or_default()
24635    }
24636}
24637impl Default for PARAM_REQUEST_READ_DATA {
24638    fn default() -> Self {
24639        Self::DEFAULT.clone()
24640    }
24641}
24642impl MessageData for PARAM_REQUEST_READ_DATA {
24643    type Message = MavMessage;
24644    const ID: u32 = 20u32;
24645    const NAME: &'static str = "PARAM_REQUEST_READ";
24646    const EXTRA_CRC: u8 = 214u8;
24647    const ENCODED_LEN: usize = 20usize;
24648    fn deser(
24649        _version: MavlinkVersion,
24650        __input: &[u8],
24651    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24652        let avail_len = __input.len();
24653        let mut payload_buf = [0; Self::ENCODED_LEN];
24654        let mut buf = if avail_len < Self::ENCODED_LEN {
24655            payload_buf[0..avail_len].copy_from_slice(__input);
24656            Bytes::new(&payload_buf)
24657        } else {
24658            Bytes::new(__input)
24659        };
24660        let mut __struct = Self::default();
24661        __struct.param_index = buf.get_i16_le()?;
24662        __struct.target_system = buf.get_u8()?;
24663        __struct.target_component = buf.get_u8()?;
24664        let mut tmp = [0_u8; 16usize];
24665        for v in &mut tmp {
24666            *v = buf.get_u8()?;
24667        }
24668        __struct.param_id = CharArray::new(tmp);
24669        Ok(__struct)
24670    }
24671    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24672        let mut __tmp = BytesMut::new(bytes);
24673        #[allow(clippy::absurd_extreme_comparisons)]
24674        #[allow(unused_comparisons)]
24675        if __tmp.remaining() < Self::ENCODED_LEN {
24676            panic!(
24677                "buffer is too small (need {} bytes, but got {})",
24678                Self::ENCODED_LEN,
24679                __tmp.remaining(),
24680            )
24681        }
24682        __tmp.put_i16_le(self.param_index);
24683        __tmp.put_u8(self.target_system);
24684        __tmp.put_u8(self.target_component);
24685        for val in &self.param_id {
24686            __tmp.put_u8(*val);
24687        }
24688        if matches!(version, MavlinkVersion::V2) {
24689            let len = __tmp.len();
24690            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24691        } else {
24692            __tmp.len()
24693        }
24694    }
24695}
24696#[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
24697#[doc = ""]
24698#[doc = "ID: 23"]
24699#[derive(Debug, Clone, PartialEq)]
24700#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24701#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24702#[cfg_attr(feature = "ts", derive(TS))]
24703#[cfg_attr(feature = "ts", ts(export))]
24704pub struct PARAM_SET_DATA {
24705    #[doc = "Onboard parameter value"]
24706    pub param_value: f32,
24707    #[doc = "System ID"]
24708    pub target_system: u8,
24709    #[doc = "Component ID"]
24710    pub target_component: u8,
24711    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24712    #[cfg_attr(feature = "ts", ts(type = "string"))]
24713    pub param_id: CharArray<16>,
24714    #[doc = "Onboard parameter type."]
24715    pub param_type: MavParamType,
24716}
24717impl PARAM_SET_DATA {
24718    pub const ENCODED_LEN: usize = 23usize;
24719    pub const DEFAULT: Self = Self {
24720        param_value: 0.0_f32,
24721        target_system: 0_u8,
24722        target_component: 0_u8,
24723        param_id: CharArray::new([0_u8; 16usize]),
24724        param_type: MavParamType::DEFAULT,
24725    };
24726    #[cfg(feature = "arbitrary")]
24727    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24728        use arbitrary::{Arbitrary, Unstructured};
24729        let mut buf = [0u8; 1024];
24730        rng.fill_bytes(&mut buf);
24731        let mut unstructured = Unstructured::new(&buf);
24732        Self::arbitrary(&mut unstructured).unwrap_or_default()
24733    }
24734}
24735impl Default for PARAM_SET_DATA {
24736    fn default() -> Self {
24737        Self::DEFAULT.clone()
24738    }
24739}
24740impl MessageData for PARAM_SET_DATA {
24741    type Message = MavMessage;
24742    const ID: u32 = 23u32;
24743    const NAME: &'static str = "PARAM_SET";
24744    const EXTRA_CRC: u8 = 168u8;
24745    const ENCODED_LEN: usize = 23usize;
24746    fn deser(
24747        _version: MavlinkVersion,
24748        __input: &[u8],
24749    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24750        let avail_len = __input.len();
24751        let mut payload_buf = [0; Self::ENCODED_LEN];
24752        let mut buf = if avail_len < Self::ENCODED_LEN {
24753            payload_buf[0..avail_len].copy_from_slice(__input);
24754            Bytes::new(&payload_buf)
24755        } else {
24756            Bytes::new(__input)
24757        };
24758        let mut __struct = Self::default();
24759        __struct.param_value = buf.get_f32_le()?;
24760        __struct.target_system = buf.get_u8()?;
24761        __struct.target_component = buf.get_u8()?;
24762        let mut tmp = [0_u8; 16usize];
24763        for v in &mut tmp {
24764            *v = buf.get_u8()?;
24765        }
24766        __struct.param_id = CharArray::new(tmp);
24767        let tmp = buf.get_u8()?;
24768        __struct.param_type =
24769            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24770                enum_type: "MavParamType",
24771                value: tmp as u64,
24772            })?;
24773        Ok(__struct)
24774    }
24775    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24776        let mut __tmp = BytesMut::new(bytes);
24777        #[allow(clippy::absurd_extreme_comparisons)]
24778        #[allow(unused_comparisons)]
24779        if __tmp.remaining() < Self::ENCODED_LEN {
24780            panic!(
24781                "buffer is too small (need {} bytes, but got {})",
24782                Self::ENCODED_LEN,
24783                __tmp.remaining(),
24784            )
24785        }
24786        __tmp.put_f32_le(self.param_value);
24787        __tmp.put_u8(self.target_system);
24788        __tmp.put_u8(self.target_component);
24789        for val in &self.param_id {
24790            __tmp.put_u8(*val);
24791        }
24792        __tmp.put_u8(self.param_type as u8);
24793        if matches!(version, MavlinkVersion::V2) {
24794            let len = __tmp.len();
24795            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24796        } else {
24797            __tmp.len()
24798        }
24799    }
24800}
24801#[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
24802#[doc = ""]
24803#[doc = "ID: 22"]
24804#[derive(Debug, Clone, PartialEq)]
24805#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24806#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24807#[cfg_attr(feature = "ts", derive(TS))]
24808#[cfg_attr(feature = "ts", ts(export))]
24809pub struct PARAM_VALUE_DATA {
24810    #[doc = "Onboard parameter value"]
24811    pub param_value: f32,
24812    #[doc = "Total number of onboard parameters"]
24813    pub param_count: u16,
24814    #[doc = "Index of this onboard parameter"]
24815    pub param_index: u16,
24816    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24817    #[cfg_attr(feature = "ts", ts(type = "string"))]
24818    pub param_id: CharArray<16>,
24819    #[doc = "Onboard parameter type."]
24820    pub param_type: MavParamType,
24821}
24822impl PARAM_VALUE_DATA {
24823    pub const ENCODED_LEN: usize = 25usize;
24824    pub const DEFAULT: Self = Self {
24825        param_value: 0.0_f32,
24826        param_count: 0_u16,
24827        param_index: 0_u16,
24828        param_id: CharArray::new([0_u8; 16usize]),
24829        param_type: MavParamType::DEFAULT,
24830    };
24831    #[cfg(feature = "arbitrary")]
24832    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24833        use arbitrary::{Arbitrary, Unstructured};
24834        let mut buf = [0u8; 1024];
24835        rng.fill_bytes(&mut buf);
24836        let mut unstructured = Unstructured::new(&buf);
24837        Self::arbitrary(&mut unstructured).unwrap_or_default()
24838    }
24839}
24840impl Default for PARAM_VALUE_DATA {
24841    fn default() -> Self {
24842        Self::DEFAULT.clone()
24843    }
24844}
24845impl MessageData for PARAM_VALUE_DATA {
24846    type Message = MavMessage;
24847    const ID: u32 = 22u32;
24848    const NAME: &'static str = "PARAM_VALUE";
24849    const EXTRA_CRC: u8 = 220u8;
24850    const ENCODED_LEN: usize = 25usize;
24851    fn deser(
24852        _version: MavlinkVersion,
24853        __input: &[u8],
24854    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24855        let avail_len = __input.len();
24856        let mut payload_buf = [0; Self::ENCODED_LEN];
24857        let mut buf = if avail_len < Self::ENCODED_LEN {
24858            payload_buf[0..avail_len].copy_from_slice(__input);
24859            Bytes::new(&payload_buf)
24860        } else {
24861            Bytes::new(__input)
24862        };
24863        let mut __struct = Self::default();
24864        __struct.param_value = buf.get_f32_le()?;
24865        __struct.param_count = buf.get_u16_le()?;
24866        __struct.param_index = buf.get_u16_le()?;
24867        let mut tmp = [0_u8; 16usize];
24868        for v in &mut tmp {
24869            *v = buf.get_u8()?;
24870        }
24871        __struct.param_id = CharArray::new(tmp);
24872        let tmp = buf.get_u8()?;
24873        __struct.param_type =
24874            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24875                enum_type: "MavParamType",
24876                value: tmp as u64,
24877            })?;
24878        Ok(__struct)
24879    }
24880    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24881        let mut __tmp = BytesMut::new(bytes);
24882        #[allow(clippy::absurd_extreme_comparisons)]
24883        #[allow(unused_comparisons)]
24884        if __tmp.remaining() < Self::ENCODED_LEN {
24885            panic!(
24886                "buffer is too small (need {} bytes, but got {})",
24887                Self::ENCODED_LEN,
24888                __tmp.remaining(),
24889            )
24890        }
24891        __tmp.put_f32_le(self.param_value);
24892        __tmp.put_u16_le(self.param_count);
24893        __tmp.put_u16_le(self.param_index);
24894        for val in &self.param_id {
24895            __tmp.put_u8(*val);
24896        }
24897        __tmp.put_u8(self.param_type as u8);
24898        if matches!(version, MavlinkVersion::V2) {
24899            let len = __tmp.len();
24900            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24901        } else {
24902            __tmp.len()
24903        }
24904    }
24905}
24906#[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
24907#[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
24908#[doc = ""]
24909#[doc = "ID: 4"]
24910#[derive(Debug, Clone, PartialEq)]
24911#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24912#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24913#[cfg_attr(feature = "ts", derive(TS))]
24914#[cfg_attr(feature = "ts", ts(export))]
24915pub struct PING_DATA {
24916    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
24917    pub time_usec: u64,
24918    #[doc = "PING sequence"]
24919    pub seq: u32,
24920    #[doc = "0: request ping from all receiving systems. If greater than 0: message is a ping response and number is the system id of the requesting system"]
24921    pub target_system: u8,
24922    #[doc = "0: request ping from all receiving components. If greater than 0: message is a ping response and number is the component id of the requesting component."]
24923    pub target_component: u8,
24924}
24925impl PING_DATA {
24926    pub const ENCODED_LEN: usize = 14usize;
24927    pub const DEFAULT: Self = Self {
24928        time_usec: 0_u64,
24929        seq: 0_u32,
24930        target_system: 0_u8,
24931        target_component: 0_u8,
24932    };
24933    #[cfg(feature = "arbitrary")]
24934    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24935        use arbitrary::{Arbitrary, Unstructured};
24936        let mut buf = [0u8; 1024];
24937        rng.fill_bytes(&mut buf);
24938        let mut unstructured = Unstructured::new(&buf);
24939        Self::arbitrary(&mut unstructured).unwrap_or_default()
24940    }
24941}
24942impl Default for PING_DATA {
24943    fn default() -> Self {
24944        Self::DEFAULT.clone()
24945    }
24946}
24947impl MessageData for PING_DATA {
24948    type Message = MavMessage;
24949    const ID: u32 = 4u32;
24950    const NAME: &'static str = "PING";
24951    const EXTRA_CRC: u8 = 237u8;
24952    const ENCODED_LEN: usize = 14usize;
24953    fn deser(
24954        _version: MavlinkVersion,
24955        __input: &[u8],
24956    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24957        let avail_len = __input.len();
24958        let mut payload_buf = [0; Self::ENCODED_LEN];
24959        let mut buf = if avail_len < Self::ENCODED_LEN {
24960            payload_buf[0..avail_len].copy_from_slice(__input);
24961            Bytes::new(&payload_buf)
24962        } else {
24963            Bytes::new(__input)
24964        };
24965        let mut __struct = Self::default();
24966        __struct.time_usec = buf.get_u64_le()?;
24967        __struct.seq = buf.get_u32_le()?;
24968        __struct.target_system = buf.get_u8()?;
24969        __struct.target_component = buf.get_u8()?;
24970        Ok(__struct)
24971    }
24972    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24973        let mut __tmp = BytesMut::new(bytes);
24974        #[allow(clippy::absurd_extreme_comparisons)]
24975        #[allow(unused_comparisons)]
24976        if __tmp.remaining() < Self::ENCODED_LEN {
24977            panic!(
24978                "buffer is too small (need {} bytes, but got {})",
24979                Self::ENCODED_LEN,
24980                __tmp.remaining(),
24981            )
24982        }
24983        __tmp.put_u64_le(self.time_usec);
24984        __tmp.put_u32_le(self.seq);
24985        __tmp.put_u8(self.target_system);
24986        __tmp.put_u8(self.target_component);
24987        if matches!(version, MavlinkVersion::V2) {
24988            let len = __tmp.len();
24989            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24990        } else {
24991            __tmp.len()
24992        }
24993    }
24994}
24995#[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
24996#[doc = "Control vehicle tone generation (buzzer)."]
24997#[doc = ""]
24998#[doc = "ID: 258"]
24999#[derive(Debug, Clone, PartialEq)]
25000#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25001#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25002#[cfg_attr(feature = "ts", derive(TS))]
25003#[cfg_attr(feature = "ts", ts(export))]
25004pub struct PLAY_TUNE_DATA {
25005    #[doc = "System ID"]
25006    pub target_system: u8,
25007    #[doc = "Component ID"]
25008    pub target_component: u8,
25009    #[doc = "tune in board specific format"]
25010    #[cfg_attr(feature = "ts", ts(type = "string"))]
25011    pub tune: CharArray<30>,
25012    #[doc = "tune extension (appended to tune)"]
25013    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25014    #[cfg_attr(feature = "ts", ts(type = "string"))]
25015    pub tune2: CharArray<200>,
25016}
25017impl PLAY_TUNE_DATA {
25018    pub const ENCODED_LEN: usize = 232usize;
25019    pub const DEFAULT: Self = Self {
25020        target_system: 0_u8,
25021        target_component: 0_u8,
25022        tune: CharArray::new([0_u8; 30usize]),
25023        tune2: CharArray::new([0_u8; 200usize]),
25024    };
25025    #[cfg(feature = "arbitrary")]
25026    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25027        use arbitrary::{Arbitrary, Unstructured};
25028        let mut buf = [0u8; 1024];
25029        rng.fill_bytes(&mut buf);
25030        let mut unstructured = Unstructured::new(&buf);
25031        Self::arbitrary(&mut unstructured).unwrap_or_default()
25032    }
25033}
25034impl Default for PLAY_TUNE_DATA {
25035    fn default() -> Self {
25036        Self::DEFAULT.clone()
25037    }
25038}
25039impl MessageData for PLAY_TUNE_DATA {
25040    type Message = MavMessage;
25041    const ID: u32 = 258u32;
25042    const NAME: &'static str = "PLAY_TUNE";
25043    const EXTRA_CRC: u8 = 187u8;
25044    const ENCODED_LEN: usize = 232usize;
25045    fn deser(
25046        _version: MavlinkVersion,
25047        __input: &[u8],
25048    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25049        let avail_len = __input.len();
25050        let mut payload_buf = [0; Self::ENCODED_LEN];
25051        let mut buf = if avail_len < Self::ENCODED_LEN {
25052            payload_buf[0..avail_len].copy_from_slice(__input);
25053            Bytes::new(&payload_buf)
25054        } else {
25055            Bytes::new(__input)
25056        };
25057        let mut __struct = Self::default();
25058        __struct.target_system = buf.get_u8()?;
25059        __struct.target_component = buf.get_u8()?;
25060        let mut tmp = [0_u8; 30usize];
25061        for v in &mut tmp {
25062            *v = buf.get_u8()?;
25063        }
25064        __struct.tune = CharArray::new(tmp);
25065        let mut tmp = [0_u8; 200usize];
25066        for v in &mut tmp {
25067            *v = buf.get_u8()?;
25068        }
25069        __struct.tune2 = CharArray::new(tmp);
25070        Ok(__struct)
25071    }
25072    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25073        let mut __tmp = BytesMut::new(bytes);
25074        #[allow(clippy::absurd_extreme_comparisons)]
25075        #[allow(unused_comparisons)]
25076        if __tmp.remaining() < Self::ENCODED_LEN {
25077            panic!(
25078                "buffer is too small (need {} bytes, but got {})",
25079                Self::ENCODED_LEN,
25080                __tmp.remaining(),
25081            )
25082        }
25083        __tmp.put_u8(self.target_system);
25084        __tmp.put_u8(self.target_component);
25085        for val in &self.tune {
25086            __tmp.put_u8(*val);
25087        }
25088        if matches!(version, MavlinkVersion::V2) {
25089            for val in &self.tune2 {
25090                __tmp.put_u8(*val);
25091            }
25092            let len = __tmp.len();
25093            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25094        } else {
25095            __tmp.len()
25096        }
25097    }
25098}
25099#[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
25100#[doc = ""]
25101#[doc = "ID: 400"]
25102#[derive(Debug, Clone, PartialEq)]
25103#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25104#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25105#[cfg_attr(feature = "ts", derive(TS))]
25106#[cfg_attr(feature = "ts", ts(export))]
25107pub struct PLAY_TUNE_V2_DATA {
25108    #[doc = "Tune format"]
25109    pub format: TuneFormat,
25110    #[doc = "System ID"]
25111    pub target_system: u8,
25112    #[doc = "Component ID"]
25113    pub target_component: u8,
25114    #[doc = "Tune definition as a NULL-terminated string."]
25115    #[cfg_attr(feature = "ts", ts(type = "string"))]
25116    pub tune: CharArray<248>,
25117}
25118impl PLAY_TUNE_V2_DATA {
25119    pub const ENCODED_LEN: usize = 254usize;
25120    pub const DEFAULT: Self = Self {
25121        format: TuneFormat::DEFAULT,
25122        target_system: 0_u8,
25123        target_component: 0_u8,
25124        tune: CharArray::new([0_u8; 248usize]),
25125    };
25126    #[cfg(feature = "arbitrary")]
25127    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25128        use arbitrary::{Arbitrary, Unstructured};
25129        let mut buf = [0u8; 1024];
25130        rng.fill_bytes(&mut buf);
25131        let mut unstructured = Unstructured::new(&buf);
25132        Self::arbitrary(&mut unstructured).unwrap_or_default()
25133    }
25134}
25135impl Default for PLAY_TUNE_V2_DATA {
25136    fn default() -> Self {
25137        Self::DEFAULT.clone()
25138    }
25139}
25140impl MessageData for PLAY_TUNE_V2_DATA {
25141    type Message = MavMessage;
25142    const ID: u32 = 400u32;
25143    const NAME: &'static str = "PLAY_TUNE_V2";
25144    const EXTRA_CRC: u8 = 110u8;
25145    const ENCODED_LEN: usize = 254usize;
25146    fn deser(
25147        _version: MavlinkVersion,
25148        __input: &[u8],
25149    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25150        let avail_len = __input.len();
25151        let mut payload_buf = [0; Self::ENCODED_LEN];
25152        let mut buf = if avail_len < Self::ENCODED_LEN {
25153            payload_buf[0..avail_len].copy_from_slice(__input);
25154            Bytes::new(&payload_buf)
25155        } else {
25156            Bytes::new(__input)
25157        };
25158        let mut __struct = Self::default();
25159        let tmp = buf.get_u32_le()?;
25160        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
25161            ::mavlink_core::error::ParserError::InvalidEnum {
25162                enum_type: "TuneFormat",
25163                value: tmp as u64,
25164            },
25165        )?;
25166        __struct.target_system = buf.get_u8()?;
25167        __struct.target_component = buf.get_u8()?;
25168        let mut tmp = [0_u8; 248usize];
25169        for v in &mut tmp {
25170            *v = buf.get_u8()?;
25171        }
25172        __struct.tune = CharArray::new(tmp);
25173        Ok(__struct)
25174    }
25175    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25176        let mut __tmp = BytesMut::new(bytes);
25177        #[allow(clippy::absurd_extreme_comparisons)]
25178        #[allow(unused_comparisons)]
25179        if __tmp.remaining() < Self::ENCODED_LEN {
25180            panic!(
25181                "buffer is too small (need {} bytes, but got {})",
25182                Self::ENCODED_LEN,
25183                __tmp.remaining(),
25184            )
25185        }
25186        __tmp.put_u32_le(self.format as u32);
25187        __tmp.put_u8(self.target_system);
25188        __tmp.put_u8(self.target_component);
25189        for val in &self.tune {
25190            __tmp.put_u8(*val);
25191        }
25192        if matches!(version, MavlinkVersion::V2) {
25193            let len = __tmp.len();
25194            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25195        } else {
25196            __tmp.len()
25197        }
25198    }
25199}
25200#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
25201#[doc = ""]
25202#[doc = "ID: 87"]
25203#[derive(Debug, Clone, PartialEq)]
25204#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25205#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25206#[cfg_attr(feature = "ts", derive(TS))]
25207#[cfg_attr(feature = "ts", ts(export))]
25208pub struct POSITION_TARGET_GLOBAL_INT_DATA {
25209    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
25210    pub time_boot_ms: u32,
25211    #[doc = "Latitude in WGS84 frame"]
25212    pub lat_int: i32,
25213    #[doc = "Longitude in WGS84 frame"]
25214    pub lon_int: i32,
25215    #[doc = "Altitude (MSL, AGL or relative to home altitude, depending on frame)"]
25216    pub alt: f32,
25217    #[doc = "X velocity in NED frame"]
25218    pub vx: f32,
25219    #[doc = "Y velocity in NED frame"]
25220    pub vy: f32,
25221    #[doc = "Z velocity in NED frame"]
25222    pub vz: f32,
25223    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
25224    pub afx: f32,
25225    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
25226    pub afy: f32,
25227    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
25228    pub afz: f32,
25229    #[doc = "yaw setpoint"]
25230    pub yaw: f32,
25231    #[doc = "yaw rate setpoint"]
25232    pub yaw_rate: f32,
25233    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
25234    pub type_mask: PositionTargetTypemask,
25235    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
25236    pub coordinate_frame: MavFrame,
25237}
25238impl POSITION_TARGET_GLOBAL_INT_DATA {
25239    pub const ENCODED_LEN: usize = 51usize;
25240    pub const DEFAULT: Self = Self {
25241        time_boot_ms: 0_u32,
25242        lat_int: 0_i32,
25243        lon_int: 0_i32,
25244        alt: 0.0_f32,
25245        vx: 0.0_f32,
25246        vy: 0.0_f32,
25247        vz: 0.0_f32,
25248        afx: 0.0_f32,
25249        afy: 0.0_f32,
25250        afz: 0.0_f32,
25251        yaw: 0.0_f32,
25252        yaw_rate: 0.0_f32,
25253        type_mask: PositionTargetTypemask::DEFAULT,
25254        coordinate_frame: MavFrame::DEFAULT,
25255    };
25256    #[cfg(feature = "arbitrary")]
25257    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25258        use arbitrary::{Arbitrary, Unstructured};
25259        let mut buf = [0u8; 1024];
25260        rng.fill_bytes(&mut buf);
25261        let mut unstructured = Unstructured::new(&buf);
25262        Self::arbitrary(&mut unstructured).unwrap_or_default()
25263    }
25264}
25265impl Default for POSITION_TARGET_GLOBAL_INT_DATA {
25266    fn default() -> Self {
25267        Self::DEFAULT.clone()
25268    }
25269}
25270impl MessageData for POSITION_TARGET_GLOBAL_INT_DATA {
25271    type Message = MavMessage;
25272    const ID: u32 = 87u32;
25273    const NAME: &'static str = "POSITION_TARGET_GLOBAL_INT";
25274    const EXTRA_CRC: u8 = 150u8;
25275    const ENCODED_LEN: usize = 51usize;
25276    fn deser(
25277        _version: MavlinkVersion,
25278        __input: &[u8],
25279    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25280        let avail_len = __input.len();
25281        let mut payload_buf = [0; Self::ENCODED_LEN];
25282        let mut buf = if avail_len < Self::ENCODED_LEN {
25283            payload_buf[0..avail_len].copy_from_slice(__input);
25284            Bytes::new(&payload_buf)
25285        } else {
25286            Bytes::new(__input)
25287        };
25288        let mut __struct = Self::default();
25289        __struct.time_boot_ms = buf.get_u32_le()?;
25290        __struct.lat_int = buf.get_i32_le()?;
25291        __struct.lon_int = buf.get_i32_le()?;
25292        __struct.alt = buf.get_f32_le()?;
25293        __struct.vx = buf.get_f32_le()?;
25294        __struct.vy = buf.get_f32_le()?;
25295        __struct.vz = buf.get_f32_le()?;
25296        __struct.afx = buf.get_f32_le()?;
25297        __struct.afy = buf.get_f32_le()?;
25298        __struct.afz = buf.get_f32_le()?;
25299        __struct.yaw = buf.get_f32_le()?;
25300        __struct.yaw_rate = buf.get_f32_le()?;
25301        let tmp = buf.get_u16_le()?;
25302        __struct.type_mask =
25303            PositionTargetTypemask::from_bits(tmp as <PositionTargetTypemask as Flags>::Bits)
25304                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
25305                    flag_type: "PositionTargetTypemask",
25306                    value: tmp as u64,
25307                })?;
25308        let tmp = buf.get_u8()?;
25309        __struct.coordinate_frame =
25310            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25311                enum_type: "MavFrame",
25312                value: tmp as u64,
25313            })?;
25314        Ok(__struct)
25315    }
25316    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25317        let mut __tmp = BytesMut::new(bytes);
25318        #[allow(clippy::absurd_extreme_comparisons)]
25319        #[allow(unused_comparisons)]
25320        if __tmp.remaining() < Self::ENCODED_LEN {
25321            panic!(
25322                "buffer is too small (need {} bytes, but got {})",
25323                Self::ENCODED_LEN,
25324                __tmp.remaining(),
25325            )
25326        }
25327        __tmp.put_u32_le(self.time_boot_ms);
25328        __tmp.put_i32_le(self.lat_int);
25329        __tmp.put_i32_le(self.lon_int);
25330        __tmp.put_f32_le(self.alt);
25331        __tmp.put_f32_le(self.vx);
25332        __tmp.put_f32_le(self.vy);
25333        __tmp.put_f32_le(self.vz);
25334        __tmp.put_f32_le(self.afx);
25335        __tmp.put_f32_le(self.afy);
25336        __tmp.put_f32_le(self.afz);
25337        __tmp.put_f32_le(self.yaw);
25338        __tmp.put_f32_le(self.yaw_rate);
25339        __tmp.put_u16_le(self.type_mask.bits() as u16);
25340        __tmp.put_u8(self.coordinate_frame as u8);
25341        if matches!(version, MavlinkVersion::V2) {
25342            let len = __tmp.len();
25343            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25344        } else {
25345            __tmp.len()
25346        }
25347    }
25348}
25349#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
25350#[doc = ""]
25351#[doc = "ID: 85"]
25352#[derive(Debug, Clone, PartialEq)]
25353#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25354#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25355#[cfg_attr(feature = "ts", derive(TS))]
25356#[cfg_attr(feature = "ts", ts(export))]
25357pub struct POSITION_TARGET_LOCAL_NED_DATA {
25358    #[doc = "Timestamp (time since system boot)."]
25359    pub time_boot_ms: u32,
25360    #[doc = "X Position in NED frame"]
25361    pub x: f32,
25362    #[doc = "Y Position in NED frame"]
25363    pub y: f32,
25364    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
25365    pub z: f32,
25366    #[doc = "X velocity in NED frame"]
25367    pub vx: f32,
25368    #[doc = "Y velocity in NED frame"]
25369    pub vy: f32,
25370    #[doc = "Z velocity in NED frame"]
25371    pub vz: f32,
25372    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
25373    pub afx: f32,
25374    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
25375    pub afy: f32,
25376    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
25377    pub afz: f32,
25378    #[doc = "yaw setpoint"]
25379    pub yaw: f32,
25380    #[doc = "yaw rate setpoint"]
25381    pub yaw_rate: f32,
25382    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
25383    pub type_mask: PositionTargetTypemask,
25384    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
25385    pub coordinate_frame: MavFrame,
25386}
25387impl POSITION_TARGET_LOCAL_NED_DATA {
25388    pub const ENCODED_LEN: usize = 51usize;
25389    pub const DEFAULT: Self = Self {
25390        time_boot_ms: 0_u32,
25391        x: 0.0_f32,
25392        y: 0.0_f32,
25393        z: 0.0_f32,
25394        vx: 0.0_f32,
25395        vy: 0.0_f32,
25396        vz: 0.0_f32,
25397        afx: 0.0_f32,
25398        afy: 0.0_f32,
25399        afz: 0.0_f32,
25400        yaw: 0.0_f32,
25401        yaw_rate: 0.0_f32,
25402        type_mask: PositionTargetTypemask::DEFAULT,
25403        coordinate_frame: MavFrame::DEFAULT,
25404    };
25405    #[cfg(feature = "arbitrary")]
25406    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25407        use arbitrary::{Arbitrary, Unstructured};
25408        let mut buf = [0u8; 1024];
25409        rng.fill_bytes(&mut buf);
25410        let mut unstructured = Unstructured::new(&buf);
25411        Self::arbitrary(&mut unstructured).unwrap_or_default()
25412    }
25413}
25414impl Default for POSITION_TARGET_LOCAL_NED_DATA {
25415    fn default() -> Self {
25416        Self::DEFAULT.clone()
25417    }
25418}
25419impl MessageData for POSITION_TARGET_LOCAL_NED_DATA {
25420    type Message = MavMessage;
25421    const ID: u32 = 85u32;
25422    const NAME: &'static str = "POSITION_TARGET_LOCAL_NED";
25423    const EXTRA_CRC: u8 = 140u8;
25424    const ENCODED_LEN: usize = 51usize;
25425    fn deser(
25426        _version: MavlinkVersion,
25427        __input: &[u8],
25428    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25429        let avail_len = __input.len();
25430        let mut payload_buf = [0; Self::ENCODED_LEN];
25431        let mut buf = if avail_len < Self::ENCODED_LEN {
25432            payload_buf[0..avail_len].copy_from_slice(__input);
25433            Bytes::new(&payload_buf)
25434        } else {
25435            Bytes::new(__input)
25436        };
25437        let mut __struct = Self::default();
25438        __struct.time_boot_ms = buf.get_u32_le()?;
25439        __struct.x = buf.get_f32_le()?;
25440        __struct.y = buf.get_f32_le()?;
25441        __struct.z = buf.get_f32_le()?;
25442        __struct.vx = buf.get_f32_le()?;
25443        __struct.vy = buf.get_f32_le()?;
25444        __struct.vz = buf.get_f32_le()?;
25445        __struct.afx = buf.get_f32_le()?;
25446        __struct.afy = buf.get_f32_le()?;
25447        __struct.afz = buf.get_f32_le()?;
25448        __struct.yaw = buf.get_f32_le()?;
25449        __struct.yaw_rate = buf.get_f32_le()?;
25450        let tmp = buf.get_u16_le()?;
25451        __struct.type_mask =
25452            PositionTargetTypemask::from_bits(tmp as <PositionTargetTypemask as Flags>::Bits)
25453                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
25454                    flag_type: "PositionTargetTypemask",
25455                    value: tmp as u64,
25456                })?;
25457        let tmp = buf.get_u8()?;
25458        __struct.coordinate_frame =
25459            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25460                enum_type: "MavFrame",
25461                value: tmp as u64,
25462            })?;
25463        Ok(__struct)
25464    }
25465    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25466        let mut __tmp = BytesMut::new(bytes);
25467        #[allow(clippy::absurd_extreme_comparisons)]
25468        #[allow(unused_comparisons)]
25469        if __tmp.remaining() < Self::ENCODED_LEN {
25470            panic!(
25471                "buffer is too small (need {} bytes, but got {})",
25472                Self::ENCODED_LEN,
25473                __tmp.remaining(),
25474            )
25475        }
25476        __tmp.put_u32_le(self.time_boot_ms);
25477        __tmp.put_f32_le(self.x);
25478        __tmp.put_f32_le(self.y);
25479        __tmp.put_f32_le(self.z);
25480        __tmp.put_f32_le(self.vx);
25481        __tmp.put_f32_le(self.vy);
25482        __tmp.put_f32_le(self.vz);
25483        __tmp.put_f32_le(self.afx);
25484        __tmp.put_f32_le(self.afy);
25485        __tmp.put_f32_le(self.afz);
25486        __tmp.put_f32_le(self.yaw);
25487        __tmp.put_f32_le(self.yaw_rate);
25488        __tmp.put_u16_le(self.type_mask.bits() as u16);
25489        __tmp.put_u8(self.coordinate_frame as u8);
25490        if matches!(version, MavlinkVersion::V2) {
25491            let len = __tmp.len();
25492            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25493        } else {
25494            __tmp.len()
25495        }
25496    }
25497}
25498#[doc = "Power supply status."]
25499#[doc = ""]
25500#[doc = "ID: 125"]
25501#[derive(Debug, Clone, PartialEq)]
25502#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25503#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25504#[cfg_attr(feature = "ts", derive(TS))]
25505#[cfg_attr(feature = "ts", ts(export))]
25506pub struct POWER_STATUS_DATA {
25507    #[doc = "5V rail voltage."]
25508    pub Vcc: u16,
25509    #[doc = "Servo rail voltage."]
25510    pub Vservo: u16,
25511    #[doc = "Bitmap of power supply status flags."]
25512    pub flags: MavPowerStatus,
25513}
25514impl POWER_STATUS_DATA {
25515    pub const ENCODED_LEN: usize = 6usize;
25516    pub const DEFAULT: Self = Self {
25517        Vcc: 0_u16,
25518        Vservo: 0_u16,
25519        flags: MavPowerStatus::DEFAULT,
25520    };
25521    #[cfg(feature = "arbitrary")]
25522    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25523        use arbitrary::{Arbitrary, Unstructured};
25524        let mut buf = [0u8; 1024];
25525        rng.fill_bytes(&mut buf);
25526        let mut unstructured = Unstructured::new(&buf);
25527        Self::arbitrary(&mut unstructured).unwrap_or_default()
25528    }
25529}
25530impl Default for POWER_STATUS_DATA {
25531    fn default() -> Self {
25532        Self::DEFAULT.clone()
25533    }
25534}
25535impl MessageData for POWER_STATUS_DATA {
25536    type Message = MavMessage;
25537    const ID: u32 = 125u32;
25538    const NAME: &'static str = "POWER_STATUS";
25539    const EXTRA_CRC: u8 = 203u8;
25540    const ENCODED_LEN: usize = 6usize;
25541    fn deser(
25542        _version: MavlinkVersion,
25543        __input: &[u8],
25544    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25545        let avail_len = __input.len();
25546        let mut payload_buf = [0; Self::ENCODED_LEN];
25547        let mut buf = if avail_len < Self::ENCODED_LEN {
25548            payload_buf[0..avail_len].copy_from_slice(__input);
25549            Bytes::new(&payload_buf)
25550        } else {
25551            Bytes::new(__input)
25552        };
25553        let mut __struct = Self::default();
25554        __struct.Vcc = buf.get_u16_le()?;
25555        __struct.Vservo = buf.get_u16_le()?;
25556        let tmp = buf.get_u16_le()?;
25557        __struct.flags = MavPowerStatus::from_bits(tmp as <MavPowerStatus as Flags>::Bits).ok_or(
25558            ::mavlink_core::error::ParserError::InvalidFlag {
25559                flag_type: "MavPowerStatus",
25560                value: tmp as u64,
25561            },
25562        )?;
25563        Ok(__struct)
25564    }
25565    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25566        let mut __tmp = BytesMut::new(bytes);
25567        #[allow(clippy::absurd_extreme_comparisons)]
25568        #[allow(unused_comparisons)]
25569        if __tmp.remaining() < Self::ENCODED_LEN {
25570            panic!(
25571                "buffer is too small (need {} bytes, but got {})",
25572                Self::ENCODED_LEN,
25573                __tmp.remaining(),
25574            )
25575        }
25576        __tmp.put_u16_le(self.Vcc);
25577        __tmp.put_u16_le(self.Vservo);
25578        __tmp.put_u16_le(self.flags.bits() as u16);
25579        if matches!(version, MavlinkVersion::V2) {
25580            let len = __tmp.len();
25581            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25582        } else {
25583            __tmp.len()
25584        }
25585    }
25586}
25587#[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
25588#[doc = ""]
25589#[doc = "ID: 300"]
25590#[derive(Debug, Clone, PartialEq)]
25591#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25592#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25593#[cfg_attr(feature = "ts", derive(TS))]
25594#[cfg_attr(feature = "ts", ts(export))]
25595pub struct PROTOCOL_VERSION_DATA {
25596    #[doc = "Currently active MAVLink version number * 100: v1.0 is 100, v2.0 is 200, etc."]
25597    pub version: u16,
25598    #[doc = "Minimum MAVLink version supported"]
25599    pub min_version: u16,
25600    #[doc = "Maximum MAVLink version supported (set to the same value as version by default)"]
25601    pub max_version: u16,
25602    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
25603    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25604    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
25605    pub spec_version_hash: [u8; 8],
25606    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
25607    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25608    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
25609    pub library_version_hash: [u8; 8],
25610}
25611impl PROTOCOL_VERSION_DATA {
25612    pub const ENCODED_LEN: usize = 22usize;
25613    pub const DEFAULT: Self = Self {
25614        version: 0_u16,
25615        min_version: 0_u16,
25616        max_version: 0_u16,
25617        spec_version_hash: [0_u8; 8usize],
25618        library_version_hash: [0_u8; 8usize],
25619    };
25620    #[cfg(feature = "arbitrary")]
25621    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25622        use arbitrary::{Arbitrary, Unstructured};
25623        let mut buf = [0u8; 1024];
25624        rng.fill_bytes(&mut buf);
25625        let mut unstructured = Unstructured::new(&buf);
25626        Self::arbitrary(&mut unstructured).unwrap_or_default()
25627    }
25628}
25629impl Default for PROTOCOL_VERSION_DATA {
25630    fn default() -> Self {
25631        Self::DEFAULT.clone()
25632    }
25633}
25634impl MessageData for PROTOCOL_VERSION_DATA {
25635    type Message = MavMessage;
25636    const ID: u32 = 300u32;
25637    const NAME: &'static str = "PROTOCOL_VERSION";
25638    const EXTRA_CRC: u8 = 217u8;
25639    const ENCODED_LEN: usize = 22usize;
25640    fn deser(
25641        _version: MavlinkVersion,
25642        __input: &[u8],
25643    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25644        let avail_len = __input.len();
25645        let mut payload_buf = [0; Self::ENCODED_LEN];
25646        let mut buf = if avail_len < Self::ENCODED_LEN {
25647            payload_buf[0..avail_len].copy_from_slice(__input);
25648            Bytes::new(&payload_buf)
25649        } else {
25650            Bytes::new(__input)
25651        };
25652        let mut __struct = Self::default();
25653        __struct.version = buf.get_u16_le()?;
25654        __struct.min_version = buf.get_u16_le()?;
25655        __struct.max_version = buf.get_u16_le()?;
25656        for v in &mut __struct.spec_version_hash {
25657            let val = buf.get_u8()?;
25658            *v = val;
25659        }
25660        for v in &mut __struct.library_version_hash {
25661            let val = buf.get_u8()?;
25662            *v = val;
25663        }
25664        Ok(__struct)
25665    }
25666    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25667        let mut __tmp = BytesMut::new(bytes);
25668        #[allow(clippy::absurd_extreme_comparisons)]
25669        #[allow(unused_comparisons)]
25670        if __tmp.remaining() < Self::ENCODED_LEN {
25671            panic!(
25672                "buffer is too small (need {} bytes, but got {})",
25673                Self::ENCODED_LEN,
25674                __tmp.remaining(),
25675            )
25676        }
25677        __tmp.put_u16_le(self.version);
25678        __tmp.put_u16_le(self.min_version);
25679        __tmp.put_u16_le(self.max_version);
25680        for val in &self.spec_version_hash {
25681            __tmp.put_u8(*val);
25682        }
25683        for val in &self.library_version_hash {
25684            __tmp.put_u8(*val);
25685        }
25686        if matches!(version, MavlinkVersion::V2) {
25687            let len = __tmp.len();
25688            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25689        } else {
25690            __tmp.len()
25691        }
25692    }
25693}
25694#[doc = "RC channel outputs from a MAVLink RC receiver for input to a flight controller or other components (allows an RC receiver to connect via MAVLink instead of some other protocol such as PPM-Sum or S.BUS).         Note that this is not intended to be an over-the-air format, and does not replace RC_CHANNELS and similar messages reported by the flight controller.         The target_system field should normally be set to the system id of the system to control, typically the flight controller.         The target_component field can normally be set to 0, so that all components of the system can receive the message.         The channels array field can publish up to 32 channels; the number of channel items used in the array is specified in the count field.         The time_last_update_ms field contains the timestamp of the last received valid channels data in the receiver's time domain.         The count field indicates the first index of the channel array that is not used for channel data (this and later indexes are zero-filled).         The RADIO_RC_CHANNELS_FLAGS_OUTDATED flag is set by the receiver if the channels data is not up-to-date (for example, if new data from the transmitter could not be validated so the last valid data is resent).         The RADIO_RC_CHANNELS_FLAGS_FAILSAFE failsafe flag is set by the receiver if the receiver's failsafe condition is met (implementation dependent, e.g., connection to the RC radio is lost).         In this case time_last_update_ms still contains the timestamp of the last valid channels data, but the content of the channels data is not defined by the protocol (it is up to the implementation of the receiver).         For instance, the channels data could contain failsafe values configured in the receiver; the default is to carry the last valid data.         Note: The RC channels fields are extensions to ensure that they are located at the end of the serialized payload and subject to MAVLink's trailing-zero trimming."]
25695#[doc = ""]
25696#[doc = "ID: 420"]
25697#[derive(Debug, Clone, PartialEq)]
25698#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25699#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25700#[cfg_attr(feature = "ts", derive(TS))]
25701#[cfg_attr(feature = "ts", ts(export))]
25702pub struct RADIO_RC_CHANNELS_DATA {
25703    #[doc = "Time when the data in the channels field were last updated (time since boot in the receiver's time domain)."]
25704    pub time_last_update_ms: u32,
25705    #[doc = "Radio RC channels status flags."]
25706    pub flags: RadioRcChannelsFlags,
25707    #[doc = "System ID (ID of target system, normally flight controller)."]
25708    pub target_system: u8,
25709    #[doc = "Component ID (normally 0 for broadcast)."]
25710    pub target_component: u8,
25711    #[doc = "Total number of RC channels being received. This can be larger than 32, indicating that more channels are available but not given in this message."]
25712    pub count: u8,
25713    #[doc = "RC channels.         Channel values are in centered 13 bit format. Range is -4096 to 4096, center is 0. Conversion to PWM is x * 5/32 + 1500.         Channels with indexes equal or above count should be set to 0, to benefit from MAVLink's trailing-zero trimming."]
25714    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25715    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25716    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
25717    pub channels: [i16; 32],
25718}
25719impl RADIO_RC_CHANNELS_DATA {
25720    pub const ENCODED_LEN: usize = 73usize;
25721    pub const DEFAULT: Self = Self {
25722        time_last_update_ms: 0_u32,
25723        flags: RadioRcChannelsFlags::DEFAULT,
25724        target_system: 0_u8,
25725        target_component: 0_u8,
25726        count: 0_u8,
25727        channels: [0_i16; 32usize],
25728    };
25729    #[cfg(feature = "arbitrary")]
25730    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25731        use arbitrary::{Arbitrary, Unstructured};
25732        let mut buf = [0u8; 1024];
25733        rng.fill_bytes(&mut buf);
25734        let mut unstructured = Unstructured::new(&buf);
25735        Self::arbitrary(&mut unstructured).unwrap_or_default()
25736    }
25737}
25738impl Default for RADIO_RC_CHANNELS_DATA {
25739    fn default() -> Self {
25740        Self::DEFAULT.clone()
25741    }
25742}
25743impl MessageData for RADIO_RC_CHANNELS_DATA {
25744    type Message = MavMessage;
25745    const ID: u32 = 420u32;
25746    const NAME: &'static str = "RADIO_RC_CHANNELS";
25747    const EXTRA_CRC: u8 = 20u8;
25748    const ENCODED_LEN: usize = 73usize;
25749    fn deser(
25750        _version: MavlinkVersion,
25751        __input: &[u8],
25752    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25753        let avail_len = __input.len();
25754        let mut payload_buf = [0; Self::ENCODED_LEN];
25755        let mut buf = if avail_len < Self::ENCODED_LEN {
25756            payload_buf[0..avail_len].copy_from_slice(__input);
25757            Bytes::new(&payload_buf)
25758        } else {
25759            Bytes::new(__input)
25760        };
25761        let mut __struct = Self::default();
25762        __struct.time_last_update_ms = buf.get_u32_le()?;
25763        let tmp = buf.get_u16_le()?;
25764        __struct.flags = RadioRcChannelsFlags::from_bits(
25765            tmp as <RadioRcChannelsFlags as Flags>::Bits,
25766        )
25767        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
25768            flag_type: "RadioRcChannelsFlags",
25769            value: tmp as u64,
25770        })?;
25771        __struct.target_system = buf.get_u8()?;
25772        __struct.target_component = buf.get_u8()?;
25773        __struct.count = buf.get_u8()?;
25774        for v in &mut __struct.channels {
25775            let val = buf.get_i16_le()?;
25776            *v = val;
25777        }
25778        Ok(__struct)
25779    }
25780    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25781        let mut __tmp = BytesMut::new(bytes);
25782        #[allow(clippy::absurd_extreme_comparisons)]
25783        #[allow(unused_comparisons)]
25784        if __tmp.remaining() < Self::ENCODED_LEN {
25785            panic!(
25786                "buffer is too small (need {} bytes, but got {})",
25787                Self::ENCODED_LEN,
25788                __tmp.remaining(),
25789            )
25790        }
25791        __tmp.put_u32_le(self.time_last_update_ms);
25792        __tmp.put_u16_le(self.flags.bits() as u16);
25793        __tmp.put_u8(self.target_system);
25794        __tmp.put_u8(self.target_component);
25795        __tmp.put_u8(self.count);
25796        if matches!(version, MavlinkVersion::V2) {
25797            for val in &self.channels {
25798                __tmp.put_i16_le(*val);
25799            }
25800            let len = __tmp.len();
25801            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25802        } else {
25803            __tmp.len()
25804        }
25805    }
25806}
25807#[doc = "Status generated by radio and injected into MAVLink stream."]
25808#[doc = ""]
25809#[doc = "ID: 109"]
25810#[derive(Debug, Clone, PartialEq)]
25811#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25812#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25813#[cfg_attr(feature = "ts", derive(TS))]
25814#[cfg_attr(feature = "ts", ts(export))]
25815pub struct RADIO_STATUS_DATA {
25816    #[doc = "Count of radio packet receive errors (since boot)."]
25817    pub rxerrors: u16,
25818    #[doc = "Count of error corrected radio packets (since boot)."]
25819    pub fixed: u16,
25820    #[doc = "Local (message sender) received signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25821    pub rssi: u8,
25822    #[doc = "Remote (message receiver) signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25823    pub remrssi: u8,
25824    #[doc = "Remaining free transmitter buffer space."]
25825    pub txbuf: u8,
25826    #[doc = "Local background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
25827    pub noise: u8,
25828    #[doc = "Remote background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
25829    pub remnoise: u8,
25830}
25831impl RADIO_STATUS_DATA {
25832    pub const ENCODED_LEN: usize = 9usize;
25833    pub const DEFAULT: Self = Self {
25834        rxerrors: 0_u16,
25835        fixed: 0_u16,
25836        rssi: 0_u8,
25837        remrssi: 0_u8,
25838        txbuf: 0_u8,
25839        noise: 0_u8,
25840        remnoise: 0_u8,
25841    };
25842    #[cfg(feature = "arbitrary")]
25843    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25844        use arbitrary::{Arbitrary, Unstructured};
25845        let mut buf = [0u8; 1024];
25846        rng.fill_bytes(&mut buf);
25847        let mut unstructured = Unstructured::new(&buf);
25848        Self::arbitrary(&mut unstructured).unwrap_or_default()
25849    }
25850}
25851impl Default for RADIO_STATUS_DATA {
25852    fn default() -> Self {
25853        Self::DEFAULT.clone()
25854    }
25855}
25856impl MessageData for RADIO_STATUS_DATA {
25857    type Message = MavMessage;
25858    const ID: u32 = 109u32;
25859    const NAME: &'static str = "RADIO_STATUS";
25860    const EXTRA_CRC: u8 = 185u8;
25861    const ENCODED_LEN: usize = 9usize;
25862    fn deser(
25863        _version: MavlinkVersion,
25864        __input: &[u8],
25865    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25866        let avail_len = __input.len();
25867        let mut payload_buf = [0; Self::ENCODED_LEN];
25868        let mut buf = if avail_len < Self::ENCODED_LEN {
25869            payload_buf[0..avail_len].copy_from_slice(__input);
25870            Bytes::new(&payload_buf)
25871        } else {
25872            Bytes::new(__input)
25873        };
25874        let mut __struct = Self::default();
25875        __struct.rxerrors = buf.get_u16_le()?;
25876        __struct.fixed = buf.get_u16_le()?;
25877        __struct.rssi = buf.get_u8()?;
25878        __struct.remrssi = buf.get_u8()?;
25879        __struct.txbuf = buf.get_u8()?;
25880        __struct.noise = buf.get_u8()?;
25881        __struct.remnoise = buf.get_u8()?;
25882        Ok(__struct)
25883    }
25884    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25885        let mut __tmp = BytesMut::new(bytes);
25886        #[allow(clippy::absurd_extreme_comparisons)]
25887        #[allow(unused_comparisons)]
25888        if __tmp.remaining() < Self::ENCODED_LEN {
25889            panic!(
25890                "buffer is too small (need {} bytes, but got {})",
25891                Self::ENCODED_LEN,
25892                __tmp.remaining(),
25893            )
25894        }
25895        __tmp.put_u16_le(self.rxerrors);
25896        __tmp.put_u16_le(self.fixed);
25897        __tmp.put_u8(self.rssi);
25898        __tmp.put_u8(self.remrssi);
25899        __tmp.put_u8(self.txbuf);
25900        __tmp.put_u8(self.noise);
25901        __tmp.put_u8(self.remnoise);
25902        if matches!(version, MavlinkVersion::V2) {
25903            let len = __tmp.len();
25904            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25905        } else {
25906            __tmp.len()
25907        }
25908    }
25909}
25910#[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
25911#[doc = ""]
25912#[doc = "ID: 27"]
25913#[derive(Debug, Clone, PartialEq)]
25914#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25915#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25916#[cfg_attr(feature = "ts", derive(TS))]
25917#[cfg_attr(feature = "ts", ts(export))]
25918pub struct RAW_IMU_DATA {
25919    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
25920    pub time_usec: u64,
25921    #[doc = "X acceleration (raw)"]
25922    pub xacc: i16,
25923    #[doc = "Y acceleration (raw)"]
25924    pub yacc: i16,
25925    #[doc = "Z acceleration (raw)"]
25926    pub zacc: i16,
25927    #[doc = "Angular speed around X axis (raw)"]
25928    pub xgyro: i16,
25929    #[doc = "Angular speed around Y axis (raw)"]
25930    pub ygyro: i16,
25931    #[doc = "Angular speed around Z axis (raw)"]
25932    pub zgyro: i16,
25933    #[doc = "X Magnetic field (raw)"]
25934    pub xmag: i16,
25935    #[doc = "Y Magnetic field (raw)"]
25936    pub ymag: i16,
25937    #[doc = "Z Magnetic field (raw)"]
25938    pub zmag: i16,
25939    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
25940    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25941    pub id: u8,
25942    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
25943    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25944    pub temperature: i16,
25945}
25946impl RAW_IMU_DATA {
25947    pub const ENCODED_LEN: usize = 29usize;
25948    pub const DEFAULT: Self = Self {
25949        time_usec: 0_u64,
25950        xacc: 0_i16,
25951        yacc: 0_i16,
25952        zacc: 0_i16,
25953        xgyro: 0_i16,
25954        ygyro: 0_i16,
25955        zgyro: 0_i16,
25956        xmag: 0_i16,
25957        ymag: 0_i16,
25958        zmag: 0_i16,
25959        id: 0_u8,
25960        temperature: 0_i16,
25961    };
25962    #[cfg(feature = "arbitrary")]
25963    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25964        use arbitrary::{Arbitrary, Unstructured};
25965        let mut buf = [0u8; 1024];
25966        rng.fill_bytes(&mut buf);
25967        let mut unstructured = Unstructured::new(&buf);
25968        Self::arbitrary(&mut unstructured).unwrap_or_default()
25969    }
25970}
25971impl Default for RAW_IMU_DATA {
25972    fn default() -> Self {
25973        Self::DEFAULT.clone()
25974    }
25975}
25976impl MessageData for RAW_IMU_DATA {
25977    type Message = MavMessage;
25978    const ID: u32 = 27u32;
25979    const NAME: &'static str = "RAW_IMU";
25980    const EXTRA_CRC: u8 = 144u8;
25981    const ENCODED_LEN: usize = 29usize;
25982    fn deser(
25983        _version: MavlinkVersion,
25984        __input: &[u8],
25985    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25986        let avail_len = __input.len();
25987        let mut payload_buf = [0; Self::ENCODED_LEN];
25988        let mut buf = if avail_len < Self::ENCODED_LEN {
25989            payload_buf[0..avail_len].copy_from_slice(__input);
25990            Bytes::new(&payload_buf)
25991        } else {
25992            Bytes::new(__input)
25993        };
25994        let mut __struct = Self::default();
25995        __struct.time_usec = buf.get_u64_le()?;
25996        __struct.xacc = buf.get_i16_le()?;
25997        __struct.yacc = buf.get_i16_le()?;
25998        __struct.zacc = buf.get_i16_le()?;
25999        __struct.xgyro = buf.get_i16_le()?;
26000        __struct.ygyro = buf.get_i16_le()?;
26001        __struct.zgyro = buf.get_i16_le()?;
26002        __struct.xmag = buf.get_i16_le()?;
26003        __struct.ymag = buf.get_i16_le()?;
26004        __struct.zmag = buf.get_i16_le()?;
26005        __struct.id = buf.get_u8()?;
26006        __struct.temperature = buf.get_i16_le()?;
26007        Ok(__struct)
26008    }
26009    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26010        let mut __tmp = BytesMut::new(bytes);
26011        #[allow(clippy::absurd_extreme_comparisons)]
26012        #[allow(unused_comparisons)]
26013        if __tmp.remaining() < Self::ENCODED_LEN {
26014            panic!(
26015                "buffer is too small (need {} bytes, but got {})",
26016                Self::ENCODED_LEN,
26017                __tmp.remaining(),
26018            )
26019        }
26020        __tmp.put_u64_le(self.time_usec);
26021        __tmp.put_i16_le(self.xacc);
26022        __tmp.put_i16_le(self.yacc);
26023        __tmp.put_i16_le(self.zacc);
26024        __tmp.put_i16_le(self.xgyro);
26025        __tmp.put_i16_le(self.ygyro);
26026        __tmp.put_i16_le(self.zgyro);
26027        __tmp.put_i16_le(self.xmag);
26028        __tmp.put_i16_le(self.ymag);
26029        __tmp.put_i16_le(self.zmag);
26030        if matches!(version, MavlinkVersion::V2) {
26031            __tmp.put_u8(self.id);
26032            __tmp.put_i16_le(self.temperature);
26033            let len = __tmp.len();
26034            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26035        } else {
26036            __tmp.len()
26037        }
26038    }
26039}
26040#[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
26041#[doc = ""]
26042#[doc = "ID: 28"]
26043#[derive(Debug, Clone, PartialEq)]
26044#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26045#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26046#[cfg_attr(feature = "ts", derive(TS))]
26047#[cfg_attr(feature = "ts", ts(export))]
26048pub struct RAW_PRESSURE_DATA {
26049    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
26050    pub time_usec: u64,
26051    #[doc = "Absolute pressure (raw)"]
26052    pub press_abs: i16,
26053    #[doc = "Differential pressure 1 (raw, 0 if nonexistent)"]
26054    pub press_diff1: i16,
26055    #[doc = "Differential pressure 2 (raw, 0 if nonexistent)"]
26056    pub press_diff2: i16,
26057    #[doc = "Raw Temperature measurement (raw)"]
26058    pub temperature: i16,
26059}
26060impl RAW_PRESSURE_DATA {
26061    pub const ENCODED_LEN: usize = 16usize;
26062    pub const DEFAULT: Self = Self {
26063        time_usec: 0_u64,
26064        press_abs: 0_i16,
26065        press_diff1: 0_i16,
26066        press_diff2: 0_i16,
26067        temperature: 0_i16,
26068    };
26069    #[cfg(feature = "arbitrary")]
26070    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26071        use arbitrary::{Arbitrary, Unstructured};
26072        let mut buf = [0u8; 1024];
26073        rng.fill_bytes(&mut buf);
26074        let mut unstructured = Unstructured::new(&buf);
26075        Self::arbitrary(&mut unstructured).unwrap_or_default()
26076    }
26077}
26078impl Default for RAW_PRESSURE_DATA {
26079    fn default() -> Self {
26080        Self::DEFAULT.clone()
26081    }
26082}
26083impl MessageData for RAW_PRESSURE_DATA {
26084    type Message = MavMessage;
26085    const ID: u32 = 28u32;
26086    const NAME: &'static str = "RAW_PRESSURE";
26087    const EXTRA_CRC: u8 = 67u8;
26088    const ENCODED_LEN: usize = 16usize;
26089    fn deser(
26090        _version: MavlinkVersion,
26091        __input: &[u8],
26092    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26093        let avail_len = __input.len();
26094        let mut payload_buf = [0; Self::ENCODED_LEN];
26095        let mut buf = if avail_len < Self::ENCODED_LEN {
26096            payload_buf[0..avail_len].copy_from_slice(__input);
26097            Bytes::new(&payload_buf)
26098        } else {
26099            Bytes::new(__input)
26100        };
26101        let mut __struct = Self::default();
26102        __struct.time_usec = buf.get_u64_le()?;
26103        __struct.press_abs = buf.get_i16_le()?;
26104        __struct.press_diff1 = buf.get_i16_le()?;
26105        __struct.press_diff2 = buf.get_i16_le()?;
26106        __struct.temperature = buf.get_i16_le()?;
26107        Ok(__struct)
26108    }
26109    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26110        let mut __tmp = BytesMut::new(bytes);
26111        #[allow(clippy::absurd_extreme_comparisons)]
26112        #[allow(unused_comparisons)]
26113        if __tmp.remaining() < Self::ENCODED_LEN {
26114            panic!(
26115                "buffer is too small (need {} bytes, but got {})",
26116                Self::ENCODED_LEN,
26117                __tmp.remaining(),
26118            )
26119        }
26120        __tmp.put_u64_le(self.time_usec);
26121        __tmp.put_i16_le(self.press_abs);
26122        __tmp.put_i16_le(self.press_diff1);
26123        __tmp.put_i16_le(self.press_diff2);
26124        __tmp.put_i16_le(self.temperature);
26125        if matches!(version, MavlinkVersion::V2) {
26126            let len = __tmp.len();
26127            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26128        } else {
26129            __tmp.len()
26130        }
26131    }
26132}
26133#[doc = "RPM sensor data message."]
26134#[doc = ""]
26135#[doc = "ID: 339"]
26136#[derive(Debug, Clone, PartialEq)]
26137#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26138#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26139#[cfg_attr(feature = "ts", derive(TS))]
26140#[cfg_attr(feature = "ts", ts(export))]
26141pub struct RAW_RPM_DATA {
26142    #[doc = "Indicated rate"]
26143    pub frequency: f32,
26144    #[doc = "Index of this RPM sensor (0-indexed)"]
26145    pub index: u8,
26146}
26147impl RAW_RPM_DATA {
26148    pub const ENCODED_LEN: usize = 5usize;
26149    pub const DEFAULT: Self = Self {
26150        frequency: 0.0_f32,
26151        index: 0_u8,
26152    };
26153    #[cfg(feature = "arbitrary")]
26154    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26155        use arbitrary::{Arbitrary, Unstructured};
26156        let mut buf = [0u8; 1024];
26157        rng.fill_bytes(&mut buf);
26158        let mut unstructured = Unstructured::new(&buf);
26159        Self::arbitrary(&mut unstructured).unwrap_or_default()
26160    }
26161}
26162impl Default for RAW_RPM_DATA {
26163    fn default() -> Self {
26164        Self::DEFAULT.clone()
26165    }
26166}
26167impl MessageData for RAW_RPM_DATA {
26168    type Message = MavMessage;
26169    const ID: u32 = 339u32;
26170    const NAME: &'static str = "RAW_RPM";
26171    const EXTRA_CRC: u8 = 199u8;
26172    const ENCODED_LEN: usize = 5usize;
26173    fn deser(
26174        _version: MavlinkVersion,
26175        __input: &[u8],
26176    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26177        let avail_len = __input.len();
26178        let mut payload_buf = [0; Self::ENCODED_LEN];
26179        let mut buf = if avail_len < Self::ENCODED_LEN {
26180            payload_buf[0..avail_len].copy_from_slice(__input);
26181            Bytes::new(&payload_buf)
26182        } else {
26183            Bytes::new(__input)
26184        };
26185        let mut __struct = Self::default();
26186        __struct.frequency = buf.get_f32_le()?;
26187        __struct.index = buf.get_u8()?;
26188        Ok(__struct)
26189    }
26190    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26191        let mut __tmp = BytesMut::new(bytes);
26192        #[allow(clippy::absurd_extreme_comparisons)]
26193        #[allow(unused_comparisons)]
26194        if __tmp.remaining() < Self::ENCODED_LEN {
26195            panic!(
26196                "buffer is too small (need {} bytes, but got {})",
26197                Self::ENCODED_LEN,
26198                __tmp.remaining(),
26199            )
26200        }
26201        __tmp.put_f32_le(self.frequency);
26202        __tmp.put_u8(self.index);
26203        if matches!(version, MavlinkVersion::V2) {
26204            let len = __tmp.len();
26205            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26206        } else {
26207            __tmp.len()
26208        }
26209    }
26210}
26211#[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
26212#[doc = ""]
26213#[doc = "ID: 65"]
26214#[derive(Debug, Clone, PartialEq)]
26215#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26216#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26217#[cfg_attr(feature = "ts", derive(TS))]
26218#[cfg_attr(feature = "ts", ts(export))]
26219pub struct RC_CHANNELS_DATA {
26220    #[doc = "Timestamp (time since system boot)."]
26221    pub time_boot_ms: u32,
26222    #[doc = "RC channel 1 value."]
26223    pub chan1_raw: u16,
26224    #[doc = "RC channel 2 value."]
26225    pub chan2_raw: u16,
26226    #[doc = "RC channel 3 value."]
26227    pub chan3_raw: u16,
26228    #[doc = "RC channel 4 value."]
26229    pub chan4_raw: u16,
26230    #[doc = "RC channel 5 value."]
26231    pub chan5_raw: u16,
26232    #[doc = "RC channel 6 value."]
26233    pub chan6_raw: u16,
26234    #[doc = "RC channel 7 value."]
26235    pub chan7_raw: u16,
26236    #[doc = "RC channel 8 value."]
26237    pub chan8_raw: u16,
26238    #[doc = "RC channel 9 value."]
26239    pub chan9_raw: u16,
26240    #[doc = "RC channel 10 value."]
26241    pub chan10_raw: u16,
26242    #[doc = "RC channel 11 value."]
26243    pub chan11_raw: u16,
26244    #[doc = "RC channel 12 value."]
26245    pub chan12_raw: u16,
26246    #[doc = "RC channel 13 value."]
26247    pub chan13_raw: u16,
26248    #[doc = "RC channel 14 value."]
26249    pub chan14_raw: u16,
26250    #[doc = "RC channel 15 value."]
26251    pub chan15_raw: u16,
26252    #[doc = "RC channel 16 value."]
26253    pub chan16_raw: u16,
26254    #[doc = "RC channel 17 value."]
26255    pub chan17_raw: u16,
26256    #[doc = "RC channel 18 value."]
26257    pub chan18_raw: u16,
26258    #[doc = "Total number of RC channels being received. This can be larger than 18, indicating that more channels are available but not given in this message. This value should be 0 when no RC channels are available."]
26259    pub chancount: u8,
26260    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
26261    pub rssi: u8,
26262}
26263impl RC_CHANNELS_DATA {
26264    pub const ENCODED_LEN: usize = 42usize;
26265    pub const DEFAULT: Self = Self {
26266        time_boot_ms: 0_u32,
26267        chan1_raw: 0_u16,
26268        chan2_raw: 0_u16,
26269        chan3_raw: 0_u16,
26270        chan4_raw: 0_u16,
26271        chan5_raw: 0_u16,
26272        chan6_raw: 0_u16,
26273        chan7_raw: 0_u16,
26274        chan8_raw: 0_u16,
26275        chan9_raw: 0_u16,
26276        chan10_raw: 0_u16,
26277        chan11_raw: 0_u16,
26278        chan12_raw: 0_u16,
26279        chan13_raw: 0_u16,
26280        chan14_raw: 0_u16,
26281        chan15_raw: 0_u16,
26282        chan16_raw: 0_u16,
26283        chan17_raw: 0_u16,
26284        chan18_raw: 0_u16,
26285        chancount: 0_u8,
26286        rssi: 0_u8,
26287    };
26288    #[cfg(feature = "arbitrary")]
26289    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26290        use arbitrary::{Arbitrary, Unstructured};
26291        let mut buf = [0u8; 1024];
26292        rng.fill_bytes(&mut buf);
26293        let mut unstructured = Unstructured::new(&buf);
26294        Self::arbitrary(&mut unstructured).unwrap_or_default()
26295    }
26296}
26297impl Default for RC_CHANNELS_DATA {
26298    fn default() -> Self {
26299        Self::DEFAULT.clone()
26300    }
26301}
26302impl MessageData for RC_CHANNELS_DATA {
26303    type Message = MavMessage;
26304    const ID: u32 = 65u32;
26305    const NAME: &'static str = "RC_CHANNELS";
26306    const EXTRA_CRC: u8 = 118u8;
26307    const ENCODED_LEN: usize = 42usize;
26308    fn deser(
26309        _version: MavlinkVersion,
26310        __input: &[u8],
26311    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26312        let avail_len = __input.len();
26313        let mut payload_buf = [0; Self::ENCODED_LEN];
26314        let mut buf = if avail_len < Self::ENCODED_LEN {
26315            payload_buf[0..avail_len].copy_from_slice(__input);
26316            Bytes::new(&payload_buf)
26317        } else {
26318            Bytes::new(__input)
26319        };
26320        let mut __struct = Self::default();
26321        __struct.time_boot_ms = buf.get_u32_le()?;
26322        __struct.chan1_raw = buf.get_u16_le()?;
26323        __struct.chan2_raw = buf.get_u16_le()?;
26324        __struct.chan3_raw = buf.get_u16_le()?;
26325        __struct.chan4_raw = buf.get_u16_le()?;
26326        __struct.chan5_raw = buf.get_u16_le()?;
26327        __struct.chan6_raw = buf.get_u16_le()?;
26328        __struct.chan7_raw = buf.get_u16_le()?;
26329        __struct.chan8_raw = buf.get_u16_le()?;
26330        __struct.chan9_raw = buf.get_u16_le()?;
26331        __struct.chan10_raw = buf.get_u16_le()?;
26332        __struct.chan11_raw = buf.get_u16_le()?;
26333        __struct.chan12_raw = buf.get_u16_le()?;
26334        __struct.chan13_raw = buf.get_u16_le()?;
26335        __struct.chan14_raw = buf.get_u16_le()?;
26336        __struct.chan15_raw = buf.get_u16_le()?;
26337        __struct.chan16_raw = buf.get_u16_le()?;
26338        __struct.chan17_raw = buf.get_u16_le()?;
26339        __struct.chan18_raw = buf.get_u16_le()?;
26340        __struct.chancount = buf.get_u8()?;
26341        __struct.rssi = buf.get_u8()?;
26342        Ok(__struct)
26343    }
26344    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26345        let mut __tmp = BytesMut::new(bytes);
26346        #[allow(clippy::absurd_extreme_comparisons)]
26347        #[allow(unused_comparisons)]
26348        if __tmp.remaining() < Self::ENCODED_LEN {
26349            panic!(
26350                "buffer is too small (need {} bytes, but got {})",
26351                Self::ENCODED_LEN,
26352                __tmp.remaining(),
26353            )
26354        }
26355        __tmp.put_u32_le(self.time_boot_ms);
26356        __tmp.put_u16_le(self.chan1_raw);
26357        __tmp.put_u16_le(self.chan2_raw);
26358        __tmp.put_u16_le(self.chan3_raw);
26359        __tmp.put_u16_le(self.chan4_raw);
26360        __tmp.put_u16_le(self.chan5_raw);
26361        __tmp.put_u16_le(self.chan6_raw);
26362        __tmp.put_u16_le(self.chan7_raw);
26363        __tmp.put_u16_le(self.chan8_raw);
26364        __tmp.put_u16_le(self.chan9_raw);
26365        __tmp.put_u16_le(self.chan10_raw);
26366        __tmp.put_u16_le(self.chan11_raw);
26367        __tmp.put_u16_le(self.chan12_raw);
26368        __tmp.put_u16_le(self.chan13_raw);
26369        __tmp.put_u16_le(self.chan14_raw);
26370        __tmp.put_u16_le(self.chan15_raw);
26371        __tmp.put_u16_le(self.chan16_raw);
26372        __tmp.put_u16_le(self.chan17_raw);
26373        __tmp.put_u16_le(self.chan18_raw);
26374        __tmp.put_u8(self.chancount);
26375        __tmp.put_u8(self.rssi);
26376        if matches!(version, MavlinkVersion::V2) {
26377            let len = __tmp.len();
26378            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26379        } else {
26380            __tmp.len()
26381        }
26382    }
26383}
26384#[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
26385#[doc = ""]
26386#[doc = "ID: 70"]
26387#[derive(Debug, Clone, PartialEq)]
26388#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26389#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26390#[cfg_attr(feature = "ts", derive(TS))]
26391#[cfg_attr(feature = "ts", ts(export))]
26392pub struct RC_CHANNELS_OVERRIDE_DATA {
26393    #[doc = "RC channel 1 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26394    pub chan1_raw: u16,
26395    #[doc = "RC channel 2 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26396    pub chan2_raw: u16,
26397    #[doc = "RC channel 3 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26398    pub chan3_raw: u16,
26399    #[doc = "RC channel 4 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26400    pub chan4_raw: u16,
26401    #[doc = "RC channel 5 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26402    pub chan5_raw: u16,
26403    #[doc = "RC channel 6 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26404    pub chan6_raw: u16,
26405    #[doc = "RC channel 7 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26406    pub chan7_raw: u16,
26407    #[doc = "RC channel 8 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
26408    pub chan8_raw: u16,
26409    #[doc = "System ID"]
26410    pub target_system: u8,
26411    #[doc = "Component ID"]
26412    pub target_component: u8,
26413    #[doc = "RC channel 9 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26414    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26415    pub chan9_raw: u16,
26416    #[doc = "RC channel 10 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26417    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26418    pub chan10_raw: u16,
26419    #[doc = "RC channel 11 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26420    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26421    pub chan11_raw: u16,
26422    #[doc = "RC channel 12 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26423    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26424    pub chan12_raw: u16,
26425    #[doc = "RC channel 13 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26426    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26427    pub chan13_raw: u16,
26428    #[doc = "RC channel 14 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26429    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26430    pub chan14_raw: u16,
26431    #[doc = "RC channel 15 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26432    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26433    pub chan15_raw: u16,
26434    #[doc = "RC channel 16 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26435    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26436    pub chan16_raw: u16,
26437    #[doc = "RC channel 17 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26438    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26439    pub chan17_raw: u16,
26440    #[doc = "RC channel 18 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
26441    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26442    pub chan18_raw: u16,
26443}
26444impl RC_CHANNELS_OVERRIDE_DATA {
26445    pub const ENCODED_LEN: usize = 38usize;
26446    pub const DEFAULT: Self = Self {
26447        chan1_raw: 0_u16,
26448        chan2_raw: 0_u16,
26449        chan3_raw: 0_u16,
26450        chan4_raw: 0_u16,
26451        chan5_raw: 0_u16,
26452        chan6_raw: 0_u16,
26453        chan7_raw: 0_u16,
26454        chan8_raw: 0_u16,
26455        target_system: 0_u8,
26456        target_component: 0_u8,
26457        chan9_raw: 0_u16,
26458        chan10_raw: 0_u16,
26459        chan11_raw: 0_u16,
26460        chan12_raw: 0_u16,
26461        chan13_raw: 0_u16,
26462        chan14_raw: 0_u16,
26463        chan15_raw: 0_u16,
26464        chan16_raw: 0_u16,
26465        chan17_raw: 0_u16,
26466        chan18_raw: 0_u16,
26467    };
26468    #[cfg(feature = "arbitrary")]
26469    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26470        use arbitrary::{Arbitrary, Unstructured};
26471        let mut buf = [0u8; 1024];
26472        rng.fill_bytes(&mut buf);
26473        let mut unstructured = Unstructured::new(&buf);
26474        Self::arbitrary(&mut unstructured).unwrap_or_default()
26475    }
26476}
26477impl Default for RC_CHANNELS_OVERRIDE_DATA {
26478    fn default() -> Self {
26479        Self::DEFAULT.clone()
26480    }
26481}
26482impl MessageData for RC_CHANNELS_OVERRIDE_DATA {
26483    type Message = MavMessage;
26484    const ID: u32 = 70u32;
26485    const NAME: &'static str = "RC_CHANNELS_OVERRIDE";
26486    const EXTRA_CRC: u8 = 124u8;
26487    const ENCODED_LEN: usize = 38usize;
26488    fn deser(
26489        _version: MavlinkVersion,
26490        __input: &[u8],
26491    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26492        let avail_len = __input.len();
26493        let mut payload_buf = [0; Self::ENCODED_LEN];
26494        let mut buf = if avail_len < Self::ENCODED_LEN {
26495            payload_buf[0..avail_len].copy_from_slice(__input);
26496            Bytes::new(&payload_buf)
26497        } else {
26498            Bytes::new(__input)
26499        };
26500        let mut __struct = Self::default();
26501        __struct.chan1_raw = buf.get_u16_le()?;
26502        __struct.chan2_raw = buf.get_u16_le()?;
26503        __struct.chan3_raw = buf.get_u16_le()?;
26504        __struct.chan4_raw = buf.get_u16_le()?;
26505        __struct.chan5_raw = buf.get_u16_le()?;
26506        __struct.chan6_raw = buf.get_u16_le()?;
26507        __struct.chan7_raw = buf.get_u16_le()?;
26508        __struct.chan8_raw = buf.get_u16_le()?;
26509        __struct.target_system = buf.get_u8()?;
26510        __struct.target_component = buf.get_u8()?;
26511        __struct.chan9_raw = buf.get_u16_le()?;
26512        __struct.chan10_raw = buf.get_u16_le()?;
26513        __struct.chan11_raw = buf.get_u16_le()?;
26514        __struct.chan12_raw = buf.get_u16_le()?;
26515        __struct.chan13_raw = buf.get_u16_le()?;
26516        __struct.chan14_raw = buf.get_u16_le()?;
26517        __struct.chan15_raw = buf.get_u16_le()?;
26518        __struct.chan16_raw = buf.get_u16_le()?;
26519        __struct.chan17_raw = buf.get_u16_le()?;
26520        __struct.chan18_raw = buf.get_u16_le()?;
26521        Ok(__struct)
26522    }
26523    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26524        let mut __tmp = BytesMut::new(bytes);
26525        #[allow(clippy::absurd_extreme_comparisons)]
26526        #[allow(unused_comparisons)]
26527        if __tmp.remaining() < Self::ENCODED_LEN {
26528            panic!(
26529                "buffer is too small (need {} bytes, but got {})",
26530                Self::ENCODED_LEN,
26531                __tmp.remaining(),
26532            )
26533        }
26534        __tmp.put_u16_le(self.chan1_raw);
26535        __tmp.put_u16_le(self.chan2_raw);
26536        __tmp.put_u16_le(self.chan3_raw);
26537        __tmp.put_u16_le(self.chan4_raw);
26538        __tmp.put_u16_le(self.chan5_raw);
26539        __tmp.put_u16_le(self.chan6_raw);
26540        __tmp.put_u16_le(self.chan7_raw);
26541        __tmp.put_u16_le(self.chan8_raw);
26542        __tmp.put_u8(self.target_system);
26543        __tmp.put_u8(self.target_component);
26544        if matches!(version, MavlinkVersion::V2) {
26545            __tmp.put_u16_le(self.chan9_raw);
26546            __tmp.put_u16_le(self.chan10_raw);
26547            __tmp.put_u16_le(self.chan11_raw);
26548            __tmp.put_u16_le(self.chan12_raw);
26549            __tmp.put_u16_le(self.chan13_raw);
26550            __tmp.put_u16_le(self.chan14_raw);
26551            __tmp.put_u16_le(self.chan15_raw);
26552            __tmp.put_u16_le(self.chan16_raw);
26553            __tmp.put_u16_le(self.chan17_raw);
26554            __tmp.put_u16_le(self.chan18_raw);
26555            let len = __tmp.len();
26556            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26557        } else {
26558            __tmp.len()
26559        }
26560    }
26561}
26562#[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
26563#[doc = ""]
26564#[doc = "ID: 35"]
26565#[derive(Debug, Clone, PartialEq)]
26566#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26567#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26568#[cfg_attr(feature = "ts", derive(TS))]
26569#[cfg_attr(feature = "ts", ts(export))]
26570pub struct RC_CHANNELS_RAW_DATA {
26571    #[doc = "Timestamp (time since system boot)."]
26572    pub time_boot_ms: u32,
26573    #[doc = "RC channel 1 value."]
26574    pub chan1_raw: u16,
26575    #[doc = "RC channel 2 value."]
26576    pub chan2_raw: u16,
26577    #[doc = "RC channel 3 value."]
26578    pub chan3_raw: u16,
26579    #[doc = "RC channel 4 value."]
26580    pub chan4_raw: u16,
26581    #[doc = "RC channel 5 value."]
26582    pub chan5_raw: u16,
26583    #[doc = "RC channel 6 value."]
26584    pub chan6_raw: u16,
26585    #[doc = "RC channel 7 value."]
26586    pub chan7_raw: u16,
26587    #[doc = "RC channel 8 value."]
26588    pub chan8_raw: u16,
26589    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
26590    pub port: u8,
26591    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
26592    pub rssi: u8,
26593}
26594impl RC_CHANNELS_RAW_DATA {
26595    pub const ENCODED_LEN: usize = 22usize;
26596    pub const DEFAULT: Self = Self {
26597        time_boot_ms: 0_u32,
26598        chan1_raw: 0_u16,
26599        chan2_raw: 0_u16,
26600        chan3_raw: 0_u16,
26601        chan4_raw: 0_u16,
26602        chan5_raw: 0_u16,
26603        chan6_raw: 0_u16,
26604        chan7_raw: 0_u16,
26605        chan8_raw: 0_u16,
26606        port: 0_u8,
26607        rssi: 0_u8,
26608    };
26609    #[cfg(feature = "arbitrary")]
26610    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26611        use arbitrary::{Arbitrary, Unstructured};
26612        let mut buf = [0u8; 1024];
26613        rng.fill_bytes(&mut buf);
26614        let mut unstructured = Unstructured::new(&buf);
26615        Self::arbitrary(&mut unstructured).unwrap_or_default()
26616    }
26617}
26618impl Default for RC_CHANNELS_RAW_DATA {
26619    fn default() -> Self {
26620        Self::DEFAULT.clone()
26621    }
26622}
26623impl MessageData for RC_CHANNELS_RAW_DATA {
26624    type Message = MavMessage;
26625    const ID: u32 = 35u32;
26626    const NAME: &'static str = "RC_CHANNELS_RAW";
26627    const EXTRA_CRC: u8 = 244u8;
26628    const ENCODED_LEN: usize = 22usize;
26629    fn deser(
26630        _version: MavlinkVersion,
26631        __input: &[u8],
26632    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26633        let avail_len = __input.len();
26634        let mut payload_buf = [0; Self::ENCODED_LEN];
26635        let mut buf = if avail_len < Self::ENCODED_LEN {
26636            payload_buf[0..avail_len].copy_from_slice(__input);
26637            Bytes::new(&payload_buf)
26638        } else {
26639            Bytes::new(__input)
26640        };
26641        let mut __struct = Self::default();
26642        __struct.time_boot_ms = buf.get_u32_le()?;
26643        __struct.chan1_raw = buf.get_u16_le()?;
26644        __struct.chan2_raw = buf.get_u16_le()?;
26645        __struct.chan3_raw = buf.get_u16_le()?;
26646        __struct.chan4_raw = buf.get_u16_le()?;
26647        __struct.chan5_raw = buf.get_u16_le()?;
26648        __struct.chan6_raw = buf.get_u16_le()?;
26649        __struct.chan7_raw = buf.get_u16_le()?;
26650        __struct.chan8_raw = buf.get_u16_le()?;
26651        __struct.port = buf.get_u8()?;
26652        __struct.rssi = buf.get_u8()?;
26653        Ok(__struct)
26654    }
26655    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26656        let mut __tmp = BytesMut::new(bytes);
26657        #[allow(clippy::absurd_extreme_comparisons)]
26658        #[allow(unused_comparisons)]
26659        if __tmp.remaining() < Self::ENCODED_LEN {
26660            panic!(
26661                "buffer is too small (need {} bytes, but got {})",
26662                Self::ENCODED_LEN,
26663                __tmp.remaining(),
26664            )
26665        }
26666        __tmp.put_u32_le(self.time_boot_ms);
26667        __tmp.put_u16_le(self.chan1_raw);
26668        __tmp.put_u16_le(self.chan2_raw);
26669        __tmp.put_u16_le(self.chan3_raw);
26670        __tmp.put_u16_le(self.chan4_raw);
26671        __tmp.put_u16_le(self.chan5_raw);
26672        __tmp.put_u16_le(self.chan6_raw);
26673        __tmp.put_u16_le(self.chan7_raw);
26674        __tmp.put_u16_le(self.chan8_raw);
26675        __tmp.put_u8(self.port);
26676        __tmp.put_u8(self.rssi);
26677        if matches!(version, MavlinkVersion::V2) {
26678            let len = __tmp.len();
26679            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26680        } else {
26681            __tmp.len()
26682        }
26683    }
26684}
26685#[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
26686#[doc = ""]
26687#[doc = "ID: 34"]
26688#[derive(Debug, Clone, PartialEq)]
26689#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26690#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26691#[cfg_attr(feature = "ts", derive(TS))]
26692#[cfg_attr(feature = "ts", ts(export))]
26693pub struct RC_CHANNELS_SCALED_DATA {
26694    #[doc = "Timestamp (time since system boot)."]
26695    pub time_boot_ms: u32,
26696    #[doc = "RC channel 1 value scaled."]
26697    pub chan1_scaled: i16,
26698    #[doc = "RC channel 2 value scaled."]
26699    pub chan2_scaled: i16,
26700    #[doc = "RC channel 3 value scaled."]
26701    pub chan3_scaled: i16,
26702    #[doc = "RC channel 4 value scaled."]
26703    pub chan4_scaled: i16,
26704    #[doc = "RC channel 5 value scaled."]
26705    pub chan5_scaled: i16,
26706    #[doc = "RC channel 6 value scaled."]
26707    pub chan6_scaled: i16,
26708    #[doc = "RC channel 7 value scaled."]
26709    pub chan7_scaled: i16,
26710    #[doc = "RC channel 8 value scaled."]
26711    pub chan8_scaled: i16,
26712    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
26713    pub port: u8,
26714    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
26715    pub rssi: u8,
26716}
26717impl RC_CHANNELS_SCALED_DATA {
26718    pub const ENCODED_LEN: usize = 22usize;
26719    pub const DEFAULT: Self = Self {
26720        time_boot_ms: 0_u32,
26721        chan1_scaled: 0_i16,
26722        chan2_scaled: 0_i16,
26723        chan3_scaled: 0_i16,
26724        chan4_scaled: 0_i16,
26725        chan5_scaled: 0_i16,
26726        chan6_scaled: 0_i16,
26727        chan7_scaled: 0_i16,
26728        chan8_scaled: 0_i16,
26729        port: 0_u8,
26730        rssi: 0_u8,
26731    };
26732    #[cfg(feature = "arbitrary")]
26733    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26734        use arbitrary::{Arbitrary, Unstructured};
26735        let mut buf = [0u8; 1024];
26736        rng.fill_bytes(&mut buf);
26737        let mut unstructured = Unstructured::new(&buf);
26738        Self::arbitrary(&mut unstructured).unwrap_or_default()
26739    }
26740}
26741impl Default for RC_CHANNELS_SCALED_DATA {
26742    fn default() -> Self {
26743        Self::DEFAULT.clone()
26744    }
26745}
26746impl MessageData for RC_CHANNELS_SCALED_DATA {
26747    type Message = MavMessage;
26748    const ID: u32 = 34u32;
26749    const NAME: &'static str = "RC_CHANNELS_SCALED";
26750    const EXTRA_CRC: u8 = 237u8;
26751    const ENCODED_LEN: usize = 22usize;
26752    fn deser(
26753        _version: MavlinkVersion,
26754        __input: &[u8],
26755    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26756        let avail_len = __input.len();
26757        let mut payload_buf = [0; Self::ENCODED_LEN];
26758        let mut buf = if avail_len < Self::ENCODED_LEN {
26759            payload_buf[0..avail_len].copy_from_slice(__input);
26760            Bytes::new(&payload_buf)
26761        } else {
26762            Bytes::new(__input)
26763        };
26764        let mut __struct = Self::default();
26765        __struct.time_boot_ms = buf.get_u32_le()?;
26766        __struct.chan1_scaled = buf.get_i16_le()?;
26767        __struct.chan2_scaled = buf.get_i16_le()?;
26768        __struct.chan3_scaled = buf.get_i16_le()?;
26769        __struct.chan4_scaled = buf.get_i16_le()?;
26770        __struct.chan5_scaled = buf.get_i16_le()?;
26771        __struct.chan6_scaled = buf.get_i16_le()?;
26772        __struct.chan7_scaled = buf.get_i16_le()?;
26773        __struct.chan8_scaled = buf.get_i16_le()?;
26774        __struct.port = buf.get_u8()?;
26775        __struct.rssi = buf.get_u8()?;
26776        Ok(__struct)
26777    }
26778    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26779        let mut __tmp = BytesMut::new(bytes);
26780        #[allow(clippy::absurd_extreme_comparisons)]
26781        #[allow(unused_comparisons)]
26782        if __tmp.remaining() < Self::ENCODED_LEN {
26783            panic!(
26784                "buffer is too small (need {} bytes, but got {})",
26785                Self::ENCODED_LEN,
26786                __tmp.remaining(),
26787            )
26788        }
26789        __tmp.put_u32_le(self.time_boot_ms);
26790        __tmp.put_i16_le(self.chan1_scaled);
26791        __tmp.put_i16_le(self.chan2_scaled);
26792        __tmp.put_i16_le(self.chan3_scaled);
26793        __tmp.put_i16_le(self.chan4_scaled);
26794        __tmp.put_i16_le(self.chan5_scaled);
26795        __tmp.put_i16_le(self.chan6_scaled);
26796        __tmp.put_i16_le(self.chan7_scaled);
26797        __tmp.put_i16_le(self.chan8_scaled);
26798        __tmp.put_u8(self.port);
26799        __tmp.put_u8(self.rssi);
26800        if matches!(version, MavlinkVersion::V2) {
26801            let len = __tmp.len();
26802            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26803        } else {
26804            __tmp.len()
26805        }
26806    }
26807}
26808#[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
26809#[doc = "Request a data stream."]
26810#[doc = ""]
26811#[doc = "ID: 66"]
26812#[derive(Debug, Clone, PartialEq)]
26813#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26814#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26815#[cfg_attr(feature = "ts", derive(TS))]
26816#[cfg_attr(feature = "ts", ts(export))]
26817pub struct REQUEST_DATA_STREAM_DATA {
26818    #[doc = "The requested message rate"]
26819    pub req_message_rate: u16,
26820    #[doc = "The target requested to send the message stream."]
26821    pub target_system: u8,
26822    #[doc = "The target requested to send the message stream."]
26823    pub target_component: u8,
26824    #[doc = "The ID of the requested data stream"]
26825    pub req_stream_id: u8,
26826    #[doc = "1 to start sending, 0 to stop sending."]
26827    pub start_stop: u8,
26828}
26829impl REQUEST_DATA_STREAM_DATA {
26830    pub const ENCODED_LEN: usize = 6usize;
26831    pub const DEFAULT: Self = Self {
26832        req_message_rate: 0_u16,
26833        target_system: 0_u8,
26834        target_component: 0_u8,
26835        req_stream_id: 0_u8,
26836        start_stop: 0_u8,
26837    };
26838    #[cfg(feature = "arbitrary")]
26839    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26840        use arbitrary::{Arbitrary, Unstructured};
26841        let mut buf = [0u8; 1024];
26842        rng.fill_bytes(&mut buf);
26843        let mut unstructured = Unstructured::new(&buf);
26844        Self::arbitrary(&mut unstructured).unwrap_or_default()
26845    }
26846}
26847impl Default for REQUEST_DATA_STREAM_DATA {
26848    fn default() -> Self {
26849        Self::DEFAULT.clone()
26850    }
26851}
26852impl MessageData for REQUEST_DATA_STREAM_DATA {
26853    type Message = MavMessage;
26854    const ID: u32 = 66u32;
26855    const NAME: &'static str = "REQUEST_DATA_STREAM";
26856    const EXTRA_CRC: u8 = 148u8;
26857    const ENCODED_LEN: usize = 6usize;
26858    fn deser(
26859        _version: MavlinkVersion,
26860        __input: &[u8],
26861    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26862        let avail_len = __input.len();
26863        let mut payload_buf = [0; Self::ENCODED_LEN];
26864        let mut buf = if avail_len < Self::ENCODED_LEN {
26865            payload_buf[0..avail_len].copy_from_slice(__input);
26866            Bytes::new(&payload_buf)
26867        } else {
26868            Bytes::new(__input)
26869        };
26870        let mut __struct = Self::default();
26871        __struct.req_message_rate = buf.get_u16_le()?;
26872        __struct.target_system = buf.get_u8()?;
26873        __struct.target_component = buf.get_u8()?;
26874        __struct.req_stream_id = buf.get_u8()?;
26875        __struct.start_stop = buf.get_u8()?;
26876        Ok(__struct)
26877    }
26878    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26879        let mut __tmp = BytesMut::new(bytes);
26880        #[allow(clippy::absurd_extreme_comparisons)]
26881        #[allow(unused_comparisons)]
26882        if __tmp.remaining() < Self::ENCODED_LEN {
26883            panic!(
26884                "buffer is too small (need {} bytes, but got {})",
26885                Self::ENCODED_LEN,
26886                __tmp.remaining(),
26887            )
26888        }
26889        __tmp.put_u16_le(self.req_message_rate);
26890        __tmp.put_u8(self.target_system);
26891        __tmp.put_u8(self.target_component);
26892        __tmp.put_u8(self.req_stream_id);
26893        __tmp.put_u8(self.start_stop);
26894        if matches!(version, MavlinkVersion::V2) {
26895            let len = __tmp.len();
26896            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26897        } else {
26898            __tmp.len()
26899        }
26900    }
26901}
26902#[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
26903#[doc = ""]
26904#[doc = "ID: 412"]
26905#[derive(Debug, Clone, PartialEq)]
26906#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26907#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26908#[cfg_attr(feature = "ts", derive(TS))]
26909#[cfg_attr(feature = "ts", ts(export))]
26910pub struct REQUEST_EVENT_DATA {
26911    #[doc = "First sequence number of the requested event."]
26912    pub first_sequence: u16,
26913    #[doc = "Last sequence number of the requested event."]
26914    pub last_sequence: u16,
26915    #[doc = "System ID"]
26916    pub target_system: u8,
26917    #[doc = "Component ID"]
26918    pub target_component: u8,
26919}
26920impl REQUEST_EVENT_DATA {
26921    pub const ENCODED_LEN: usize = 6usize;
26922    pub const DEFAULT: Self = Self {
26923        first_sequence: 0_u16,
26924        last_sequence: 0_u16,
26925        target_system: 0_u8,
26926        target_component: 0_u8,
26927    };
26928    #[cfg(feature = "arbitrary")]
26929    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26930        use arbitrary::{Arbitrary, Unstructured};
26931        let mut buf = [0u8; 1024];
26932        rng.fill_bytes(&mut buf);
26933        let mut unstructured = Unstructured::new(&buf);
26934        Self::arbitrary(&mut unstructured).unwrap_or_default()
26935    }
26936}
26937impl Default for REQUEST_EVENT_DATA {
26938    fn default() -> Self {
26939        Self::DEFAULT.clone()
26940    }
26941}
26942impl MessageData for REQUEST_EVENT_DATA {
26943    type Message = MavMessage;
26944    const ID: u32 = 412u32;
26945    const NAME: &'static str = "REQUEST_EVENT";
26946    const EXTRA_CRC: u8 = 33u8;
26947    const ENCODED_LEN: usize = 6usize;
26948    fn deser(
26949        _version: MavlinkVersion,
26950        __input: &[u8],
26951    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26952        let avail_len = __input.len();
26953        let mut payload_buf = [0; Self::ENCODED_LEN];
26954        let mut buf = if avail_len < Self::ENCODED_LEN {
26955            payload_buf[0..avail_len].copy_from_slice(__input);
26956            Bytes::new(&payload_buf)
26957        } else {
26958            Bytes::new(__input)
26959        };
26960        let mut __struct = Self::default();
26961        __struct.first_sequence = buf.get_u16_le()?;
26962        __struct.last_sequence = buf.get_u16_le()?;
26963        __struct.target_system = buf.get_u8()?;
26964        __struct.target_component = buf.get_u8()?;
26965        Ok(__struct)
26966    }
26967    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26968        let mut __tmp = BytesMut::new(bytes);
26969        #[allow(clippy::absurd_extreme_comparisons)]
26970        #[allow(unused_comparisons)]
26971        if __tmp.remaining() < Self::ENCODED_LEN {
26972            panic!(
26973                "buffer is too small (need {} bytes, but got {})",
26974                Self::ENCODED_LEN,
26975                __tmp.remaining(),
26976            )
26977        }
26978        __tmp.put_u16_le(self.first_sequence);
26979        __tmp.put_u16_le(self.last_sequence);
26980        __tmp.put_u8(self.target_system);
26981        __tmp.put_u8(self.target_component);
26982        if matches!(version, MavlinkVersion::V2) {
26983            let len = __tmp.len();
26984            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26985        } else {
26986            __tmp.len()
26987        }
26988    }
26989}
26990#[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
26991#[doc = ""]
26992#[doc = "ID: 142"]
26993#[derive(Debug, Clone, PartialEq)]
26994#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26995#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26996#[cfg_attr(feature = "ts", derive(TS))]
26997#[cfg_attr(feature = "ts", ts(export))]
26998pub struct RESOURCE_REQUEST_DATA {
26999    #[doc = "Request ID. This ID should be re-used when sending back URI contents"]
27000    pub request_id: u8,
27001    #[doc = "The type of requested URI. 0 = a file via URL. 1 = a UAVCAN binary"]
27002    pub uri_type: u8,
27003    #[doc = "The requested unique resource identifier (URI). It is not necessarily a straight domain name (depends on the URI type enum)"]
27004    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27005    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27006    pub uri: [u8; 120],
27007    #[doc = "The way the autopilot wants to receive the URI. 0 = MAVLink FTP. 1 = binary stream."]
27008    pub transfer_type: u8,
27009    #[doc = "The storage path the autopilot wants the URI to be stored in. Will only be valid if the transfer_type has a storage associated (e.g. MAVLink FTP)."]
27010    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27011    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
27012    pub storage: [u8; 120],
27013}
27014impl RESOURCE_REQUEST_DATA {
27015    pub const ENCODED_LEN: usize = 243usize;
27016    pub const DEFAULT: Self = Self {
27017        request_id: 0_u8,
27018        uri_type: 0_u8,
27019        uri: [0_u8; 120usize],
27020        transfer_type: 0_u8,
27021        storage: [0_u8; 120usize],
27022    };
27023    #[cfg(feature = "arbitrary")]
27024    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27025        use arbitrary::{Arbitrary, Unstructured};
27026        let mut buf = [0u8; 1024];
27027        rng.fill_bytes(&mut buf);
27028        let mut unstructured = Unstructured::new(&buf);
27029        Self::arbitrary(&mut unstructured).unwrap_or_default()
27030    }
27031}
27032impl Default for RESOURCE_REQUEST_DATA {
27033    fn default() -> Self {
27034        Self::DEFAULT.clone()
27035    }
27036}
27037impl MessageData for RESOURCE_REQUEST_DATA {
27038    type Message = MavMessage;
27039    const ID: u32 = 142u32;
27040    const NAME: &'static str = "RESOURCE_REQUEST";
27041    const EXTRA_CRC: u8 = 72u8;
27042    const ENCODED_LEN: usize = 243usize;
27043    fn deser(
27044        _version: MavlinkVersion,
27045        __input: &[u8],
27046    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27047        let avail_len = __input.len();
27048        let mut payload_buf = [0; Self::ENCODED_LEN];
27049        let mut buf = if avail_len < Self::ENCODED_LEN {
27050            payload_buf[0..avail_len].copy_from_slice(__input);
27051            Bytes::new(&payload_buf)
27052        } else {
27053            Bytes::new(__input)
27054        };
27055        let mut __struct = Self::default();
27056        __struct.request_id = buf.get_u8()?;
27057        __struct.uri_type = buf.get_u8()?;
27058        for v in &mut __struct.uri {
27059            let val = buf.get_u8()?;
27060            *v = val;
27061        }
27062        __struct.transfer_type = buf.get_u8()?;
27063        for v in &mut __struct.storage {
27064            let val = buf.get_u8()?;
27065            *v = val;
27066        }
27067        Ok(__struct)
27068    }
27069    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27070        let mut __tmp = BytesMut::new(bytes);
27071        #[allow(clippy::absurd_extreme_comparisons)]
27072        #[allow(unused_comparisons)]
27073        if __tmp.remaining() < Self::ENCODED_LEN {
27074            panic!(
27075                "buffer is too small (need {} bytes, but got {})",
27076                Self::ENCODED_LEN,
27077                __tmp.remaining(),
27078            )
27079        }
27080        __tmp.put_u8(self.request_id);
27081        __tmp.put_u8(self.uri_type);
27082        for val in &self.uri {
27083            __tmp.put_u8(*val);
27084        }
27085        __tmp.put_u8(self.transfer_type);
27086        for val in &self.storage {
27087            __tmp.put_u8(*val);
27088        }
27089        if matches!(version, MavlinkVersion::V2) {
27090            let len = __tmp.len();
27091            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27092        } else {
27093            __tmp.len()
27094        }
27095    }
27096}
27097#[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
27098#[doc = ""]
27099#[doc = "ID: 413"]
27100#[derive(Debug, Clone, PartialEq)]
27101#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27102#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27103#[cfg_attr(feature = "ts", derive(TS))]
27104#[cfg_attr(feature = "ts", ts(export))]
27105pub struct RESPONSE_EVENT_ERROR_DATA {
27106    #[doc = "Sequence number."]
27107    pub sequence: u16,
27108    #[doc = "Oldest Sequence number that is still available after the sequence set in REQUEST_EVENT."]
27109    pub sequence_oldest_available: u16,
27110    #[doc = "System ID"]
27111    pub target_system: u8,
27112    #[doc = "Component ID"]
27113    pub target_component: u8,
27114    #[doc = "Error reason."]
27115    pub reason: MavEventErrorReason,
27116}
27117impl RESPONSE_EVENT_ERROR_DATA {
27118    pub const ENCODED_LEN: usize = 7usize;
27119    pub const DEFAULT: Self = Self {
27120        sequence: 0_u16,
27121        sequence_oldest_available: 0_u16,
27122        target_system: 0_u8,
27123        target_component: 0_u8,
27124        reason: MavEventErrorReason::DEFAULT,
27125    };
27126    #[cfg(feature = "arbitrary")]
27127    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27128        use arbitrary::{Arbitrary, Unstructured};
27129        let mut buf = [0u8; 1024];
27130        rng.fill_bytes(&mut buf);
27131        let mut unstructured = Unstructured::new(&buf);
27132        Self::arbitrary(&mut unstructured).unwrap_or_default()
27133    }
27134}
27135impl Default for RESPONSE_EVENT_ERROR_DATA {
27136    fn default() -> Self {
27137        Self::DEFAULT.clone()
27138    }
27139}
27140impl MessageData for RESPONSE_EVENT_ERROR_DATA {
27141    type Message = MavMessage;
27142    const ID: u32 = 413u32;
27143    const NAME: &'static str = "RESPONSE_EVENT_ERROR";
27144    const EXTRA_CRC: u8 = 77u8;
27145    const ENCODED_LEN: usize = 7usize;
27146    fn deser(
27147        _version: MavlinkVersion,
27148        __input: &[u8],
27149    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27150        let avail_len = __input.len();
27151        let mut payload_buf = [0; Self::ENCODED_LEN];
27152        let mut buf = if avail_len < Self::ENCODED_LEN {
27153            payload_buf[0..avail_len].copy_from_slice(__input);
27154            Bytes::new(&payload_buf)
27155        } else {
27156            Bytes::new(__input)
27157        };
27158        let mut __struct = Self::default();
27159        __struct.sequence = buf.get_u16_le()?;
27160        __struct.sequence_oldest_available = buf.get_u16_le()?;
27161        __struct.target_system = buf.get_u8()?;
27162        __struct.target_component = buf.get_u8()?;
27163        let tmp = buf.get_u8()?;
27164        __struct.reason =
27165            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27166                enum_type: "MavEventErrorReason",
27167                value: tmp as u64,
27168            })?;
27169        Ok(__struct)
27170    }
27171    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27172        let mut __tmp = BytesMut::new(bytes);
27173        #[allow(clippy::absurd_extreme_comparisons)]
27174        #[allow(unused_comparisons)]
27175        if __tmp.remaining() < Self::ENCODED_LEN {
27176            panic!(
27177                "buffer is too small (need {} bytes, but got {})",
27178                Self::ENCODED_LEN,
27179                __tmp.remaining(),
27180            )
27181        }
27182        __tmp.put_u16_le(self.sequence);
27183        __tmp.put_u16_le(self.sequence_oldest_available);
27184        __tmp.put_u8(self.target_system);
27185        __tmp.put_u8(self.target_component);
27186        __tmp.put_u8(self.reason as u8);
27187        if matches!(version, MavlinkVersion::V2) {
27188            let len = __tmp.len();
27189            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27190        } else {
27191            __tmp.len()
27192        }
27193    }
27194}
27195#[doc = "Read out the safety zone the MAV currently assumes."]
27196#[doc = ""]
27197#[doc = "ID: 55"]
27198#[derive(Debug, Clone, PartialEq)]
27199#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27200#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27201#[cfg_attr(feature = "ts", derive(TS))]
27202#[cfg_attr(feature = "ts", ts(export))]
27203pub struct SAFETY_ALLOWED_AREA_DATA {
27204    #[doc = "x position 1 / Latitude 1"]
27205    pub p1x: f32,
27206    #[doc = "y position 1 / Longitude 1"]
27207    pub p1y: f32,
27208    #[doc = "z position 1 / Altitude 1"]
27209    pub p1z: f32,
27210    #[doc = "x position 2 / Latitude 2"]
27211    pub p2x: f32,
27212    #[doc = "y position 2 / Longitude 2"]
27213    pub p2y: f32,
27214    #[doc = "z position 2 / Altitude 2"]
27215    pub p2z: f32,
27216    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
27217    pub frame: MavFrame,
27218}
27219impl SAFETY_ALLOWED_AREA_DATA {
27220    pub const ENCODED_LEN: usize = 25usize;
27221    pub const DEFAULT: Self = Self {
27222        p1x: 0.0_f32,
27223        p1y: 0.0_f32,
27224        p1z: 0.0_f32,
27225        p2x: 0.0_f32,
27226        p2y: 0.0_f32,
27227        p2z: 0.0_f32,
27228        frame: MavFrame::DEFAULT,
27229    };
27230    #[cfg(feature = "arbitrary")]
27231    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27232        use arbitrary::{Arbitrary, Unstructured};
27233        let mut buf = [0u8; 1024];
27234        rng.fill_bytes(&mut buf);
27235        let mut unstructured = Unstructured::new(&buf);
27236        Self::arbitrary(&mut unstructured).unwrap_or_default()
27237    }
27238}
27239impl Default for SAFETY_ALLOWED_AREA_DATA {
27240    fn default() -> Self {
27241        Self::DEFAULT.clone()
27242    }
27243}
27244impl MessageData for SAFETY_ALLOWED_AREA_DATA {
27245    type Message = MavMessage;
27246    const ID: u32 = 55u32;
27247    const NAME: &'static str = "SAFETY_ALLOWED_AREA";
27248    const EXTRA_CRC: u8 = 3u8;
27249    const ENCODED_LEN: usize = 25usize;
27250    fn deser(
27251        _version: MavlinkVersion,
27252        __input: &[u8],
27253    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27254        let avail_len = __input.len();
27255        let mut payload_buf = [0; Self::ENCODED_LEN];
27256        let mut buf = if avail_len < Self::ENCODED_LEN {
27257            payload_buf[0..avail_len].copy_from_slice(__input);
27258            Bytes::new(&payload_buf)
27259        } else {
27260            Bytes::new(__input)
27261        };
27262        let mut __struct = Self::default();
27263        __struct.p1x = buf.get_f32_le()?;
27264        __struct.p1y = buf.get_f32_le()?;
27265        __struct.p1z = buf.get_f32_le()?;
27266        __struct.p2x = buf.get_f32_le()?;
27267        __struct.p2y = buf.get_f32_le()?;
27268        __struct.p2z = buf.get_f32_le()?;
27269        let tmp = buf.get_u8()?;
27270        __struct.frame =
27271            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27272                enum_type: "MavFrame",
27273                value: tmp as u64,
27274            })?;
27275        Ok(__struct)
27276    }
27277    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27278        let mut __tmp = BytesMut::new(bytes);
27279        #[allow(clippy::absurd_extreme_comparisons)]
27280        #[allow(unused_comparisons)]
27281        if __tmp.remaining() < Self::ENCODED_LEN {
27282            panic!(
27283                "buffer is too small (need {} bytes, but got {})",
27284                Self::ENCODED_LEN,
27285                __tmp.remaining(),
27286            )
27287        }
27288        __tmp.put_f32_le(self.p1x);
27289        __tmp.put_f32_le(self.p1y);
27290        __tmp.put_f32_le(self.p1z);
27291        __tmp.put_f32_le(self.p2x);
27292        __tmp.put_f32_le(self.p2y);
27293        __tmp.put_f32_le(self.p2z);
27294        __tmp.put_u8(self.frame as u8);
27295        if matches!(version, MavlinkVersion::V2) {
27296            let len = __tmp.len();
27297            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27298        } else {
27299            __tmp.len()
27300        }
27301    }
27302}
27303#[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
27304#[doc = ""]
27305#[doc = "ID: 54"]
27306#[derive(Debug, Clone, PartialEq)]
27307#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27308#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27309#[cfg_attr(feature = "ts", derive(TS))]
27310#[cfg_attr(feature = "ts", ts(export))]
27311pub struct SAFETY_SET_ALLOWED_AREA_DATA {
27312    #[doc = "x position 1 / Latitude 1"]
27313    pub p1x: f32,
27314    #[doc = "y position 1 / Longitude 1"]
27315    pub p1y: f32,
27316    #[doc = "z position 1 / Altitude 1"]
27317    pub p1z: f32,
27318    #[doc = "x position 2 / Latitude 2"]
27319    pub p2x: f32,
27320    #[doc = "y position 2 / Longitude 2"]
27321    pub p2y: f32,
27322    #[doc = "z position 2 / Altitude 2"]
27323    pub p2z: f32,
27324    #[doc = "System ID"]
27325    pub target_system: u8,
27326    #[doc = "Component ID"]
27327    pub target_component: u8,
27328    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
27329    pub frame: MavFrame,
27330}
27331impl SAFETY_SET_ALLOWED_AREA_DATA {
27332    pub const ENCODED_LEN: usize = 27usize;
27333    pub const DEFAULT: Self = Self {
27334        p1x: 0.0_f32,
27335        p1y: 0.0_f32,
27336        p1z: 0.0_f32,
27337        p2x: 0.0_f32,
27338        p2y: 0.0_f32,
27339        p2z: 0.0_f32,
27340        target_system: 0_u8,
27341        target_component: 0_u8,
27342        frame: MavFrame::DEFAULT,
27343    };
27344    #[cfg(feature = "arbitrary")]
27345    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27346        use arbitrary::{Arbitrary, Unstructured};
27347        let mut buf = [0u8; 1024];
27348        rng.fill_bytes(&mut buf);
27349        let mut unstructured = Unstructured::new(&buf);
27350        Self::arbitrary(&mut unstructured).unwrap_or_default()
27351    }
27352}
27353impl Default for SAFETY_SET_ALLOWED_AREA_DATA {
27354    fn default() -> Self {
27355        Self::DEFAULT.clone()
27356    }
27357}
27358impl MessageData for SAFETY_SET_ALLOWED_AREA_DATA {
27359    type Message = MavMessage;
27360    const ID: u32 = 54u32;
27361    const NAME: &'static str = "SAFETY_SET_ALLOWED_AREA";
27362    const EXTRA_CRC: u8 = 15u8;
27363    const ENCODED_LEN: usize = 27usize;
27364    fn deser(
27365        _version: MavlinkVersion,
27366        __input: &[u8],
27367    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27368        let avail_len = __input.len();
27369        let mut payload_buf = [0; Self::ENCODED_LEN];
27370        let mut buf = if avail_len < Self::ENCODED_LEN {
27371            payload_buf[0..avail_len].copy_from_slice(__input);
27372            Bytes::new(&payload_buf)
27373        } else {
27374            Bytes::new(__input)
27375        };
27376        let mut __struct = Self::default();
27377        __struct.p1x = buf.get_f32_le()?;
27378        __struct.p1y = buf.get_f32_le()?;
27379        __struct.p1z = buf.get_f32_le()?;
27380        __struct.p2x = buf.get_f32_le()?;
27381        __struct.p2y = buf.get_f32_le()?;
27382        __struct.p2z = buf.get_f32_le()?;
27383        __struct.target_system = buf.get_u8()?;
27384        __struct.target_component = buf.get_u8()?;
27385        let tmp = buf.get_u8()?;
27386        __struct.frame =
27387            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27388                enum_type: "MavFrame",
27389                value: tmp as u64,
27390            })?;
27391        Ok(__struct)
27392    }
27393    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27394        let mut __tmp = BytesMut::new(bytes);
27395        #[allow(clippy::absurd_extreme_comparisons)]
27396        #[allow(unused_comparisons)]
27397        if __tmp.remaining() < Self::ENCODED_LEN {
27398            panic!(
27399                "buffer is too small (need {} bytes, but got {})",
27400                Self::ENCODED_LEN,
27401                __tmp.remaining(),
27402            )
27403        }
27404        __tmp.put_f32_le(self.p1x);
27405        __tmp.put_f32_le(self.p1y);
27406        __tmp.put_f32_le(self.p1z);
27407        __tmp.put_f32_le(self.p2x);
27408        __tmp.put_f32_le(self.p2y);
27409        __tmp.put_f32_le(self.p2z);
27410        __tmp.put_u8(self.target_system);
27411        __tmp.put_u8(self.target_component);
27412        __tmp.put_u8(self.frame as u8);
27413        if matches!(version, MavlinkVersion::V2) {
27414            let len = __tmp.len();
27415            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27416        } else {
27417            __tmp.len()
27418        }
27419    }
27420}
27421#[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
27422#[doc = ""]
27423#[doc = "ID: 26"]
27424#[derive(Debug, Clone, PartialEq)]
27425#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27426#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27427#[cfg_attr(feature = "ts", derive(TS))]
27428#[cfg_attr(feature = "ts", ts(export))]
27429pub struct SCALED_IMU_DATA {
27430    #[doc = "Timestamp (time since system boot)."]
27431    pub time_boot_ms: u32,
27432    #[doc = "X acceleration"]
27433    pub xacc: i16,
27434    #[doc = "Y acceleration"]
27435    pub yacc: i16,
27436    #[doc = "Z acceleration"]
27437    pub zacc: i16,
27438    #[doc = "Angular speed around X axis"]
27439    pub xgyro: i16,
27440    #[doc = "Angular speed around Y axis"]
27441    pub ygyro: i16,
27442    #[doc = "Angular speed around Z axis"]
27443    pub zgyro: i16,
27444    #[doc = "X Magnetic field"]
27445    pub xmag: i16,
27446    #[doc = "Y Magnetic field"]
27447    pub ymag: i16,
27448    #[doc = "Z Magnetic field"]
27449    pub zmag: i16,
27450    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
27451    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27452    pub temperature: i16,
27453}
27454impl SCALED_IMU_DATA {
27455    pub const ENCODED_LEN: usize = 24usize;
27456    pub const DEFAULT: Self = Self {
27457        time_boot_ms: 0_u32,
27458        xacc: 0_i16,
27459        yacc: 0_i16,
27460        zacc: 0_i16,
27461        xgyro: 0_i16,
27462        ygyro: 0_i16,
27463        zgyro: 0_i16,
27464        xmag: 0_i16,
27465        ymag: 0_i16,
27466        zmag: 0_i16,
27467        temperature: 0_i16,
27468    };
27469    #[cfg(feature = "arbitrary")]
27470    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27471        use arbitrary::{Arbitrary, Unstructured};
27472        let mut buf = [0u8; 1024];
27473        rng.fill_bytes(&mut buf);
27474        let mut unstructured = Unstructured::new(&buf);
27475        Self::arbitrary(&mut unstructured).unwrap_or_default()
27476    }
27477}
27478impl Default for SCALED_IMU_DATA {
27479    fn default() -> Self {
27480        Self::DEFAULT.clone()
27481    }
27482}
27483impl MessageData for SCALED_IMU_DATA {
27484    type Message = MavMessage;
27485    const ID: u32 = 26u32;
27486    const NAME: &'static str = "SCALED_IMU";
27487    const EXTRA_CRC: u8 = 170u8;
27488    const ENCODED_LEN: usize = 24usize;
27489    fn deser(
27490        _version: MavlinkVersion,
27491        __input: &[u8],
27492    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27493        let avail_len = __input.len();
27494        let mut payload_buf = [0; Self::ENCODED_LEN];
27495        let mut buf = if avail_len < Self::ENCODED_LEN {
27496            payload_buf[0..avail_len].copy_from_slice(__input);
27497            Bytes::new(&payload_buf)
27498        } else {
27499            Bytes::new(__input)
27500        };
27501        let mut __struct = Self::default();
27502        __struct.time_boot_ms = buf.get_u32_le()?;
27503        __struct.xacc = buf.get_i16_le()?;
27504        __struct.yacc = buf.get_i16_le()?;
27505        __struct.zacc = buf.get_i16_le()?;
27506        __struct.xgyro = buf.get_i16_le()?;
27507        __struct.ygyro = buf.get_i16_le()?;
27508        __struct.zgyro = buf.get_i16_le()?;
27509        __struct.xmag = buf.get_i16_le()?;
27510        __struct.ymag = buf.get_i16_le()?;
27511        __struct.zmag = buf.get_i16_le()?;
27512        __struct.temperature = buf.get_i16_le()?;
27513        Ok(__struct)
27514    }
27515    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27516        let mut __tmp = BytesMut::new(bytes);
27517        #[allow(clippy::absurd_extreme_comparisons)]
27518        #[allow(unused_comparisons)]
27519        if __tmp.remaining() < Self::ENCODED_LEN {
27520            panic!(
27521                "buffer is too small (need {} bytes, but got {})",
27522                Self::ENCODED_LEN,
27523                __tmp.remaining(),
27524            )
27525        }
27526        __tmp.put_u32_le(self.time_boot_ms);
27527        __tmp.put_i16_le(self.xacc);
27528        __tmp.put_i16_le(self.yacc);
27529        __tmp.put_i16_le(self.zacc);
27530        __tmp.put_i16_le(self.xgyro);
27531        __tmp.put_i16_le(self.ygyro);
27532        __tmp.put_i16_le(self.zgyro);
27533        __tmp.put_i16_le(self.xmag);
27534        __tmp.put_i16_le(self.ymag);
27535        __tmp.put_i16_le(self.zmag);
27536        if matches!(version, MavlinkVersion::V2) {
27537            __tmp.put_i16_le(self.temperature);
27538            let len = __tmp.len();
27539            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27540        } else {
27541            __tmp.len()
27542        }
27543    }
27544}
27545#[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
27546#[doc = ""]
27547#[doc = "ID: 116"]
27548#[derive(Debug, Clone, PartialEq)]
27549#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27550#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27551#[cfg_attr(feature = "ts", derive(TS))]
27552#[cfg_attr(feature = "ts", ts(export))]
27553pub struct SCALED_IMU2_DATA {
27554    #[doc = "Timestamp (time since system boot)."]
27555    pub time_boot_ms: u32,
27556    #[doc = "X acceleration"]
27557    pub xacc: i16,
27558    #[doc = "Y acceleration"]
27559    pub yacc: i16,
27560    #[doc = "Z acceleration"]
27561    pub zacc: i16,
27562    #[doc = "Angular speed around X axis"]
27563    pub xgyro: i16,
27564    #[doc = "Angular speed around Y axis"]
27565    pub ygyro: i16,
27566    #[doc = "Angular speed around Z axis"]
27567    pub zgyro: i16,
27568    #[doc = "X Magnetic field"]
27569    pub xmag: i16,
27570    #[doc = "Y Magnetic field"]
27571    pub ymag: i16,
27572    #[doc = "Z Magnetic field"]
27573    pub zmag: i16,
27574    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
27575    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27576    pub temperature: i16,
27577}
27578impl SCALED_IMU2_DATA {
27579    pub const ENCODED_LEN: usize = 24usize;
27580    pub const DEFAULT: Self = Self {
27581        time_boot_ms: 0_u32,
27582        xacc: 0_i16,
27583        yacc: 0_i16,
27584        zacc: 0_i16,
27585        xgyro: 0_i16,
27586        ygyro: 0_i16,
27587        zgyro: 0_i16,
27588        xmag: 0_i16,
27589        ymag: 0_i16,
27590        zmag: 0_i16,
27591        temperature: 0_i16,
27592    };
27593    #[cfg(feature = "arbitrary")]
27594    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27595        use arbitrary::{Arbitrary, Unstructured};
27596        let mut buf = [0u8; 1024];
27597        rng.fill_bytes(&mut buf);
27598        let mut unstructured = Unstructured::new(&buf);
27599        Self::arbitrary(&mut unstructured).unwrap_or_default()
27600    }
27601}
27602impl Default for SCALED_IMU2_DATA {
27603    fn default() -> Self {
27604        Self::DEFAULT.clone()
27605    }
27606}
27607impl MessageData for SCALED_IMU2_DATA {
27608    type Message = MavMessage;
27609    const ID: u32 = 116u32;
27610    const NAME: &'static str = "SCALED_IMU2";
27611    const EXTRA_CRC: u8 = 76u8;
27612    const ENCODED_LEN: usize = 24usize;
27613    fn deser(
27614        _version: MavlinkVersion,
27615        __input: &[u8],
27616    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27617        let avail_len = __input.len();
27618        let mut payload_buf = [0; Self::ENCODED_LEN];
27619        let mut buf = if avail_len < Self::ENCODED_LEN {
27620            payload_buf[0..avail_len].copy_from_slice(__input);
27621            Bytes::new(&payload_buf)
27622        } else {
27623            Bytes::new(__input)
27624        };
27625        let mut __struct = Self::default();
27626        __struct.time_boot_ms = buf.get_u32_le()?;
27627        __struct.xacc = buf.get_i16_le()?;
27628        __struct.yacc = buf.get_i16_le()?;
27629        __struct.zacc = buf.get_i16_le()?;
27630        __struct.xgyro = buf.get_i16_le()?;
27631        __struct.ygyro = buf.get_i16_le()?;
27632        __struct.zgyro = buf.get_i16_le()?;
27633        __struct.xmag = buf.get_i16_le()?;
27634        __struct.ymag = buf.get_i16_le()?;
27635        __struct.zmag = buf.get_i16_le()?;
27636        __struct.temperature = buf.get_i16_le()?;
27637        Ok(__struct)
27638    }
27639    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27640        let mut __tmp = BytesMut::new(bytes);
27641        #[allow(clippy::absurd_extreme_comparisons)]
27642        #[allow(unused_comparisons)]
27643        if __tmp.remaining() < Self::ENCODED_LEN {
27644            panic!(
27645                "buffer is too small (need {} bytes, but got {})",
27646                Self::ENCODED_LEN,
27647                __tmp.remaining(),
27648            )
27649        }
27650        __tmp.put_u32_le(self.time_boot_ms);
27651        __tmp.put_i16_le(self.xacc);
27652        __tmp.put_i16_le(self.yacc);
27653        __tmp.put_i16_le(self.zacc);
27654        __tmp.put_i16_le(self.xgyro);
27655        __tmp.put_i16_le(self.ygyro);
27656        __tmp.put_i16_le(self.zgyro);
27657        __tmp.put_i16_le(self.xmag);
27658        __tmp.put_i16_le(self.ymag);
27659        __tmp.put_i16_le(self.zmag);
27660        if matches!(version, MavlinkVersion::V2) {
27661            __tmp.put_i16_le(self.temperature);
27662            let len = __tmp.len();
27663            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27664        } else {
27665            __tmp.len()
27666        }
27667    }
27668}
27669#[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
27670#[doc = ""]
27671#[doc = "ID: 129"]
27672#[derive(Debug, Clone, PartialEq)]
27673#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27674#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27675#[cfg_attr(feature = "ts", derive(TS))]
27676#[cfg_attr(feature = "ts", ts(export))]
27677pub struct SCALED_IMU3_DATA {
27678    #[doc = "Timestamp (time since system boot)."]
27679    pub time_boot_ms: u32,
27680    #[doc = "X acceleration"]
27681    pub xacc: i16,
27682    #[doc = "Y acceleration"]
27683    pub yacc: i16,
27684    #[doc = "Z acceleration"]
27685    pub zacc: i16,
27686    #[doc = "Angular speed around X axis"]
27687    pub xgyro: i16,
27688    #[doc = "Angular speed around Y axis"]
27689    pub ygyro: i16,
27690    #[doc = "Angular speed around Z axis"]
27691    pub zgyro: i16,
27692    #[doc = "X Magnetic field"]
27693    pub xmag: i16,
27694    #[doc = "Y Magnetic field"]
27695    pub ymag: i16,
27696    #[doc = "Z Magnetic field"]
27697    pub zmag: i16,
27698    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
27699    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27700    pub temperature: i16,
27701}
27702impl SCALED_IMU3_DATA {
27703    pub const ENCODED_LEN: usize = 24usize;
27704    pub const DEFAULT: Self = Self {
27705        time_boot_ms: 0_u32,
27706        xacc: 0_i16,
27707        yacc: 0_i16,
27708        zacc: 0_i16,
27709        xgyro: 0_i16,
27710        ygyro: 0_i16,
27711        zgyro: 0_i16,
27712        xmag: 0_i16,
27713        ymag: 0_i16,
27714        zmag: 0_i16,
27715        temperature: 0_i16,
27716    };
27717    #[cfg(feature = "arbitrary")]
27718    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27719        use arbitrary::{Arbitrary, Unstructured};
27720        let mut buf = [0u8; 1024];
27721        rng.fill_bytes(&mut buf);
27722        let mut unstructured = Unstructured::new(&buf);
27723        Self::arbitrary(&mut unstructured).unwrap_or_default()
27724    }
27725}
27726impl Default for SCALED_IMU3_DATA {
27727    fn default() -> Self {
27728        Self::DEFAULT.clone()
27729    }
27730}
27731impl MessageData for SCALED_IMU3_DATA {
27732    type Message = MavMessage;
27733    const ID: u32 = 129u32;
27734    const NAME: &'static str = "SCALED_IMU3";
27735    const EXTRA_CRC: u8 = 46u8;
27736    const ENCODED_LEN: usize = 24usize;
27737    fn deser(
27738        _version: MavlinkVersion,
27739        __input: &[u8],
27740    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27741        let avail_len = __input.len();
27742        let mut payload_buf = [0; Self::ENCODED_LEN];
27743        let mut buf = if avail_len < Self::ENCODED_LEN {
27744            payload_buf[0..avail_len].copy_from_slice(__input);
27745            Bytes::new(&payload_buf)
27746        } else {
27747            Bytes::new(__input)
27748        };
27749        let mut __struct = Self::default();
27750        __struct.time_boot_ms = buf.get_u32_le()?;
27751        __struct.xacc = buf.get_i16_le()?;
27752        __struct.yacc = buf.get_i16_le()?;
27753        __struct.zacc = buf.get_i16_le()?;
27754        __struct.xgyro = buf.get_i16_le()?;
27755        __struct.ygyro = buf.get_i16_le()?;
27756        __struct.zgyro = buf.get_i16_le()?;
27757        __struct.xmag = buf.get_i16_le()?;
27758        __struct.ymag = buf.get_i16_le()?;
27759        __struct.zmag = buf.get_i16_le()?;
27760        __struct.temperature = buf.get_i16_le()?;
27761        Ok(__struct)
27762    }
27763    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27764        let mut __tmp = BytesMut::new(bytes);
27765        #[allow(clippy::absurd_extreme_comparisons)]
27766        #[allow(unused_comparisons)]
27767        if __tmp.remaining() < Self::ENCODED_LEN {
27768            panic!(
27769                "buffer is too small (need {} bytes, but got {})",
27770                Self::ENCODED_LEN,
27771                __tmp.remaining(),
27772            )
27773        }
27774        __tmp.put_u32_le(self.time_boot_ms);
27775        __tmp.put_i16_le(self.xacc);
27776        __tmp.put_i16_le(self.yacc);
27777        __tmp.put_i16_le(self.zacc);
27778        __tmp.put_i16_le(self.xgyro);
27779        __tmp.put_i16_le(self.ygyro);
27780        __tmp.put_i16_le(self.zgyro);
27781        __tmp.put_i16_le(self.xmag);
27782        __tmp.put_i16_le(self.ymag);
27783        __tmp.put_i16_le(self.zmag);
27784        if matches!(version, MavlinkVersion::V2) {
27785            __tmp.put_i16_le(self.temperature);
27786            let len = __tmp.len();
27787            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27788        } else {
27789            __tmp.len()
27790        }
27791    }
27792}
27793#[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
27794#[doc = ""]
27795#[doc = "ID: 29"]
27796#[derive(Debug, Clone, PartialEq)]
27797#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27798#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27799#[cfg_attr(feature = "ts", derive(TS))]
27800#[cfg_attr(feature = "ts", ts(export))]
27801pub struct SCALED_PRESSURE_DATA {
27802    #[doc = "Timestamp (time since system boot)."]
27803    pub time_boot_ms: u32,
27804    #[doc = "Absolute pressure"]
27805    pub press_abs: f32,
27806    #[doc = "Differential pressure 1"]
27807    pub press_diff: f32,
27808    #[doc = "Absolute pressure temperature"]
27809    pub temperature: i16,
27810    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
27811    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27812    pub temperature_press_diff: i16,
27813}
27814impl SCALED_PRESSURE_DATA {
27815    pub const ENCODED_LEN: usize = 16usize;
27816    pub const DEFAULT: Self = Self {
27817        time_boot_ms: 0_u32,
27818        press_abs: 0.0_f32,
27819        press_diff: 0.0_f32,
27820        temperature: 0_i16,
27821        temperature_press_diff: 0_i16,
27822    };
27823    #[cfg(feature = "arbitrary")]
27824    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27825        use arbitrary::{Arbitrary, Unstructured};
27826        let mut buf = [0u8; 1024];
27827        rng.fill_bytes(&mut buf);
27828        let mut unstructured = Unstructured::new(&buf);
27829        Self::arbitrary(&mut unstructured).unwrap_or_default()
27830    }
27831}
27832impl Default for SCALED_PRESSURE_DATA {
27833    fn default() -> Self {
27834        Self::DEFAULT.clone()
27835    }
27836}
27837impl MessageData for SCALED_PRESSURE_DATA {
27838    type Message = MavMessage;
27839    const ID: u32 = 29u32;
27840    const NAME: &'static str = "SCALED_PRESSURE";
27841    const EXTRA_CRC: u8 = 115u8;
27842    const ENCODED_LEN: usize = 16usize;
27843    fn deser(
27844        _version: MavlinkVersion,
27845        __input: &[u8],
27846    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27847        let avail_len = __input.len();
27848        let mut payload_buf = [0; Self::ENCODED_LEN];
27849        let mut buf = if avail_len < Self::ENCODED_LEN {
27850            payload_buf[0..avail_len].copy_from_slice(__input);
27851            Bytes::new(&payload_buf)
27852        } else {
27853            Bytes::new(__input)
27854        };
27855        let mut __struct = Self::default();
27856        __struct.time_boot_ms = buf.get_u32_le()?;
27857        __struct.press_abs = buf.get_f32_le()?;
27858        __struct.press_diff = buf.get_f32_le()?;
27859        __struct.temperature = buf.get_i16_le()?;
27860        __struct.temperature_press_diff = buf.get_i16_le()?;
27861        Ok(__struct)
27862    }
27863    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27864        let mut __tmp = BytesMut::new(bytes);
27865        #[allow(clippy::absurd_extreme_comparisons)]
27866        #[allow(unused_comparisons)]
27867        if __tmp.remaining() < Self::ENCODED_LEN {
27868            panic!(
27869                "buffer is too small (need {} bytes, but got {})",
27870                Self::ENCODED_LEN,
27871                __tmp.remaining(),
27872            )
27873        }
27874        __tmp.put_u32_le(self.time_boot_ms);
27875        __tmp.put_f32_le(self.press_abs);
27876        __tmp.put_f32_le(self.press_diff);
27877        __tmp.put_i16_le(self.temperature);
27878        if matches!(version, MavlinkVersion::V2) {
27879            __tmp.put_i16_le(self.temperature_press_diff);
27880            let len = __tmp.len();
27881            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27882        } else {
27883            __tmp.len()
27884        }
27885    }
27886}
27887#[doc = "Barometer readings for 2nd barometer."]
27888#[doc = ""]
27889#[doc = "ID: 137"]
27890#[derive(Debug, Clone, PartialEq)]
27891#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27892#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27893#[cfg_attr(feature = "ts", derive(TS))]
27894#[cfg_attr(feature = "ts", ts(export))]
27895pub struct SCALED_PRESSURE2_DATA {
27896    #[doc = "Timestamp (time since system boot)."]
27897    pub time_boot_ms: u32,
27898    #[doc = "Absolute pressure"]
27899    pub press_abs: f32,
27900    #[doc = "Differential pressure"]
27901    pub press_diff: f32,
27902    #[doc = "Absolute pressure temperature"]
27903    pub temperature: i16,
27904    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
27905    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27906    pub temperature_press_diff: i16,
27907}
27908impl SCALED_PRESSURE2_DATA {
27909    pub const ENCODED_LEN: usize = 16usize;
27910    pub const DEFAULT: Self = Self {
27911        time_boot_ms: 0_u32,
27912        press_abs: 0.0_f32,
27913        press_diff: 0.0_f32,
27914        temperature: 0_i16,
27915        temperature_press_diff: 0_i16,
27916    };
27917    #[cfg(feature = "arbitrary")]
27918    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27919        use arbitrary::{Arbitrary, Unstructured};
27920        let mut buf = [0u8; 1024];
27921        rng.fill_bytes(&mut buf);
27922        let mut unstructured = Unstructured::new(&buf);
27923        Self::arbitrary(&mut unstructured).unwrap_or_default()
27924    }
27925}
27926impl Default for SCALED_PRESSURE2_DATA {
27927    fn default() -> Self {
27928        Self::DEFAULT.clone()
27929    }
27930}
27931impl MessageData for SCALED_PRESSURE2_DATA {
27932    type Message = MavMessage;
27933    const ID: u32 = 137u32;
27934    const NAME: &'static str = "SCALED_PRESSURE2";
27935    const EXTRA_CRC: u8 = 195u8;
27936    const ENCODED_LEN: usize = 16usize;
27937    fn deser(
27938        _version: MavlinkVersion,
27939        __input: &[u8],
27940    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27941        let avail_len = __input.len();
27942        let mut payload_buf = [0; Self::ENCODED_LEN];
27943        let mut buf = if avail_len < Self::ENCODED_LEN {
27944            payload_buf[0..avail_len].copy_from_slice(__input);
27945            Bytes::new(&payload_buf)
27946        } else {
27947            Bytes::new(__input)
27948        };
27949        let mut __struct = Self::default();
27950        __struct.time_boot_ms = buf.get_u32_le()?;
27951        __struct.press_abs = buf.get_f32_le()?;
27952        __struct.press_diff = buf.get_f32_le()?;
27953        __struct.temperature = buf.get_i16_le()?;
27954        __struct.temperature_press_diff = buf.get_i16_le()?;
27955        Ok(__struct)
27956    }
27957    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27958        let mut __tmp = BytesMut::new(bytes);
27959        #[allow(clippy::absurd_extreme_comparisons)]
27960        #[allow(unused_comparisons)]
27961        if __tmp.remaining() < Self::ENCODED_LEN {
27962            panic!(
27963                "buffer is too small (need {} bytes, but got {})",
27964                Self::ENCODED_LEN,
27965                __tmp.remaining(),
27966            )
27967        }
27968        __tmp.put_u32_le(self.time_boot_ms);
27969        __tmp.put_f32_le(self.press_abs);
27970        __tmp.put_f32_le(self.press_diff);
27971        __tmp.put_i16_le(self.temperature);
27972        if matches!(version, MavlinkVersion::V2) {
27973            __tmp.put_i16_le(self.temperature_press_diff);
27974            let len = __tmp.len();
27975            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27976        } else {
27977            __tmp.len()
27978        }
27979    }
27980}
27981#[doc = "Barometer readings for 3rd barometer."]
27982#[doc = ""]
27983#[doc = "ID: 143"]
27984#[derive(Debug, Clone, PartialEq)]
27985#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27986#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27987#[cfg_attr(feature = "ts", derive(TS))]
27988#[cfg_attr(feature = "ts", ts(export))]
27989pub struct SCALED_PRESSURE3_DATA {
27990    #[doc = "Timestamp (time since system boot)."]
27991    pub time_boot_ms: u32,
27992    #[doc = "Absolute pressure"]
27993    pub press_abs: f32,
27994    #[doc = "Differential pressure"]
27995    pub press_diff: f32,
27996    #[doc = "Absolute pressure temperature"]
27997    pub temperature: i16,
27998    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
27999    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28000    pub temperature_press_diff: i16,
28001}
28002impl SCALED_PRESSURE3_DATA {
28003    pub const ENCODED_LEN: usize = 16usize;
28004    pub const DEFAULT: Self = Self {
28005        time_boot_ms: 0_u32,
28006        press_abs: 0.0_f32,
28007        press_diff: 0.0_f32,
28008        temperature: 0_i16,
28009        temperature_press_diff: 0_i16,
28010    };
28011    #[cfg(feature = "arbitrary")]
28012    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28013        use arbitrary::{Arbitrary, Unstructured};
28014        let mut buf = [0u8; 1024];
28015        rng.fill_bytes(&mut buf);
28016        let mut unstructured = Unstructured::new(&buf);
28017        Self::arbitrary(&mut unstructured).unwrap_or_default()
28018    }
28019}
28020impl Default for SCALED_PRESSURE3_DATA {
28021    fn default() -> Self {
28022        Self::DEFAULT.clone()
28023    }
28024}
28025impl MessageData for SCALED_PRESSURE3_DATA {
28026    type Message = MavMessage;
28027    const ID: u32 = 143u32;
28028    const NAME: &'static str = "SCALED_PRESSURE3";
28029    const EXTRA_CRC: u8 = 131u8;
28030    const ENCODED_LEN: usize = 16usize;
28031    fn deser(
28032        _version: MavlinkVersion,
28033        __input: &[u8],
28034    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28035        let avail_len = __input.len();
28036        let mut payload_buf = [0; Self::ENCODED_LEN];
28037        let mut buf = if avail_len < Self::ENCODED_LEN {
28038            payload_buf[0..avail_len].copy_from_slice(__input);
28039            Bytes::new(&payload_buf)
28040        } else {
28041            Bytes::new(__input)
28042        };
28043        let mut __struct = Self::default();
28044        __struct.time_boot_ms = buf.get_u32_le()?;
28045        __struct.press_abs = buf.get_f32_le()?;
28046        __struct.press_diff = buf.get_f32_le()?;
28047        __struct.temperature = buf.get_i16_le()?;
28048        __struct.temperature_press_diff = buf.get_i16_le()?;
28049        Ok(__struct)
28050    }
28051    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28052        let mut __tmp = BytesMut::new(bytes);
28053        #[allow(clippy::absurd_extreme_comparisons)]
28054        #[allow(unused_comparisons)]
28055        if __tmp.remaining() < Self::ENCODED_LEN {
28056            panic!(
28057                "buffer is too small (need {} bytes, but got {})",
28058                Self::ENCODED_LEN,
28059                __tmp.remaining(),
28060            )
28061        }
28062        __tmp.put_u32_le(self.time_boot_ms);
28063        __tmp.put_f32_le(self.press_abs);
28064        __tmp.put_f32_le(self.press_diff);
28065        __tmp.put_i16_le(self.temperature);
28066        if matches!(version, MavlinkVersion::V2) {
28067            __tmp.put_i16_le(self.temperature_press_diff);
28068            let len = __tmp.len();
28069            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28070        } else {
28071            __tmp.len()
28072        }
28073    }
28074}
28075#[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
28076#[doc = ""]
28077#[doc = "ID: 126"]
28078#[derive(Debug, Clone, PartialEq)]
28079#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28080#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28081#[cfg_attr(feature = "ts", derive(TS))]
28082#[cfg_attr(feature = "ts", ts(export))]
28083pub struct SERIAL_CONTROL_DATA {
28084    #[doc = "Baudrate of transfer. Zero means no change."]
28085    pub baudrate: u32,
28086    #[doc = "Timeout for reply data"]
28087    pub timeout: u16,
28088    #[doc = "Serial control device type."]
28089    pub device: SerialControlDev,
28090    #[doc = "Bitmap of serial control flags."]
28091    pub flags: SerialControlFlag,
28092    #[doc = "how many bytes in this transfer"]
28093    pub count: u8,
28094    #[doc = "serial data"]
28095    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28096    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28097    pub data: [u8; 70],
28098    #[doc = "System ID"]
28099    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28100    pub target_system: u8,
28101    #[doc = "Component ID"]
28102    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28103    pub target_component: u8,
28104}
28105impl SERIAL_CONTROL_DATA {
28106    pub const ENCODED_LEN: usize = 81usize;
28107    pub const DEFAULT: Self = Self {
28108        baudrate: 0_u32,
28109        timeout: 0_u16,
28110        device: SerialControlDev::DEFAULT,
28111        flags: SerialControlFlag::DEFAULT,
28112        count: 0_u8,
28113        data: [0_u8; 70usize],
28114        target_system: 0_u8,
28115        target_component: 0_u8,
28116    };
28117    #[cfg(feature = "arbitrary")]
28118    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28119        use arbitrary::{Arbitrary, Unstructured};
28120        let mut buf = [0u8; 1024];
28121        rng.fill_bytes(&mut buf);
28122        let mut unstructured = Unstructured::new(&buf);
28123        Self::arbitrary(&mut unstructured).unwrap_or_default()
28124    }
28125}
28126impl Default for SERIAL_CONTROL_DATA {
28127    fn default() -> Self {
28128        Self::DEFAULT.clone()
28129    }
28130}
28131impl MessageData for SERIAL_CONTROL_DATA {
28132    type Message = MavMessage;
28133    const ID: u32 = 126u32;
28134    const NAME: &'static str = "SERIAL_CONTROL";
28135    const EXTRA_CRC: u8 = 220u8;
28136    const ENCODED_LEN: usize = 81usize;
28137    fn deser(
28138        _version: MavlinkVersion,
28139        __input: &[u8],
28140    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28141        let avail_len = __input.len();
28142        let mut payload_buf = [0; Self::ENCODED_LEN];
28143        let mut buf = if avail_len < Self::ENCODED_LEN {
28144            payload_buf[0..avail_len].copy_from_slice(__input);
28145            Bytes::new(&payload_buf)
28146        } else {
28147            Bytes::new(__input)
28148        };
28149        let mut __struct = Self::default();
28150        __struct.baudrate = buf.get_u32_le()?;
28151        __struct.timeout = buf.get_u16_le()?;
28152        let tmp = buf.get_u8()?;
28153        __struct.device =
28154            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28155                enum_type: "SerialControlDev",
28156                value: tmp as u64,
28157            })?;
28158        let tmp = buf.get_u8()?;
28159        __struct.flags = SerialControlFlag::from_bits(tmp as <SerialControlFlag as Flags>::Bits)
28160            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28161                flag_type: "SerialControlFlag",
28162                value: tmp as u64,
28163            })?;
28164        __struct.count = buf.get_u8()?;
28165        for v in &mut __struct.data {
28166            let val = buf.get_u8()?;
28167            *v = val;
28168        }
28169        __struct.target_system = buf.get_u8()?;
28170        __struct.target_component = buf.get_u8()?;
28171        Ok(__struct)
28172    }
28173    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28174        let mut __tmp = BytesMut::new(bytes);
28175        #[allow(clippy::absurd_extreme_comparisons)]
28176        #[allow(unused_comparisons)]
28177        if __tmp.remaining() < Self::ENCODED_LEN {
28178            panic!(
28179                "buffer is too small (need {} bytes, but got {})",
28180                Self::ENCODED_LEN,
28181                __tmp.remaining(),
28182            )
28183        }
28184        __tmp.put_u32_le(self.baudrate);
28185        __tmp.put_u16_le(self.timeout);
28186        __tmp.put_u8(self.device as u8);
28187        __tmp.put_u8(self.flags.bits() as u8);
28188        __tmp.put_u8(self.count);
28189        for val in &self.data {
28190            __tmp.put_u8(*val);
28191        }
28192        if matches!(version, MavlinkVersion::V2) {
28193            __tmp.put_u8(self.target_system);
28194            __tmp.put_u8(self.target_component);
28195            let len = __tmp.len();
28196            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28197        } else {
28198            __tmp.len()
28199        }
28200    }
28201}
28202#[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
28203#[doc = ""]
28204#[doc = "ID: 36"]
28205#[derive(Debug, Clone, PartialEq)]
28206#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28207#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28208#[cfg_attr(feature = "ts", derive(TS))]
28209#[cfg_attr(feature = "ts", ts(export))]
28210pub struct SERVO_OUTPUT_RAW_DATA {
28211    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
28212    pub time_usec: u32,
28213    #[doc = "Servo output 1 value"]
28214    pub servo1_raw: u16,
28215    #[doc = "Servo output 2 value"]
28216    pub servo2_raw: u16,
28217    #[doc = "Servo output 3 value"]
28218    pub servo3_raw: u16,
28219    #[doc = "Servo output 4 value"]
28220    pub servo4_raw: u16,
28221    #[doc = "Servo output 5 value"]
28222    pub servo5_raw: u16,
28223    #[doc = "Servo output 6 value"]
28224    pub servo6_raw: u16,
28225    #[doc = "Servo output 7 value"]
28226    pub servo7_raw: u16,
28227    #[doc = "Servo output 8 value"]
28228    pub servo8_raw: u16,
28229    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
28230    pub port: u8,
28231    #[doc = "Servo output 9 value"]
28232    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28233    pub servo9_raw: u16,
28234    #[doc = "Servo output 10 value"]
28235    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28236    pub servo10_raw: u16,
28237    #[doc = "Servo output 11 value"]
28238    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28239    pub servo11_raw: u16,
28240    #[doc = "Servo output 12 value"]
28241    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28242    pub servo12_raw: u16,
28243    #[doc = "Servo output 13 value"]
28244    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28245    pub servo13_raw: u16,
28246    #[doc = "Servo output 14 value"]
28247    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28248    pub servo14_raw: u16,
28249    #[doc = "Servo output 15 value"]
28250    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28251    pub servo15_raw: u16,
28252    #[doc = "Servo output 16 value"]
28253    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28254    pub servo16_raw: u16,
28255}
28256impl SERVO_OUTPUT_RAW_DATA {
28257    pub const ENCODED_LEN: usize = 37usize;
28258    pub const DEFAULT: Self = Self {
28259        time_usec: 0_u32,
28260        servo1_raw: 0_u16,
28261        servo2_raw: 0_u16,
28262        servo3_raw: 0_u16,
28263        servo4_raw: 0_u16,
28264        servo5_raw: 0_u16,
28265        servo6_raw: 0_u16,
28266        servo7_raw: 0_u16,
28267        servo8_raw: 0_u16,
28268        port: 0_u8,
28269        servo9_raw: 0_u16,
28270        servo10_raw: 0_u16,
28271        servo11_raw: 0_u16,
28272        servo12_raw: 0_u16,
28273        servo13_raw: 0_u16,
28274        servo14_raw: 0_u16,
28275        servo15_raw: 0_u16,
28276        servo16_raw: 0_u16,
28277    };
28278    #[cfg(feature = "arbitrary")]
28279    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28280        use arbitrary::{Arbitrary, Unstructured};
28281        let mut buf = [0u8; 1024];
28282        rng.fill_bytes(&mut buf);
28283        let mut unstructured = Unstructured::new(&buf);
28284        Self::arbitrary(&mut unstructured).unwrap_or_default()
28285    }
28286}
28287impl Default for SERVO_OUTPUT_RAW_DATA {
28288    fn default() -> Self {
28289        Self::DEFAULT.clone()
28290    }
28291}
28292impl MessageData for SERVO_OUTPUT_RAW_DATA {
28293    type Message = MavMessage;
28294    const ID: u32 = 36u32;
28295    const NAME: &'static str = "SERVO_OUTPUT_RAW";
28296    const EXTRA_CRC: u8 = 222u8;
28297    const ENCODED_LEN: usize = 37usize;
28298    fn deser(
28299        _version: MavlinkVersion,
28300        __input: &[u8],
28301    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28302        let avail_len = __input.len();
28303        let mut payload_buf = [0; Self::ENCODED_LEN];
28304        let mut buf = if avail_len < Self::ENCODED_LEN {
28305            payload_buf[0..avail_len].copy_from_slice(__input);
28306            Bytes::new(&payload_buf)
28307        } else {
28308            Bytes::new(__input)
28309        };
28310        let mut __struct = Self::default();
28311        __struct.time_usec = buf.get_u32_le()?;
28312        __struct.servo1_raw = buf.get_u16_le()?;
28313        __struct.servo2_raw = buf.get_u16_le()?;
28314        __struct.servo3_raw = buf.get_u16_le()?;
28315        __struct.servo4_raw = buf.get_u16_le()?;
28316        __struct.servo5_raw = buf.get_u16_le()?;
28317        __struct.servo6_raw = buf.get_u16_le()?;
28318        __struct.servo7_raw = buf.get_u16_le()?;
28319        __struct.servo8_raw = buf.get_u16_le()?;
28320        __struct.port = buf.get_u8()?;
28321        __struct.servo9_raw = buf.get_u16_le()?;
28322        __struct.servo10_raw = buf.get_u16_le()?;
28323        __struct.servo11_raw = buf.get_u16_le()?;
28324        __struct.servo12_raw = buf.get_u16_le()?;
28325        __struct.servo13_raw = buf.get_u16_le()?;
28326        __struct.servo14_raw = buf.get_u16_le()?;
28327        __struct.servo15_raw = buf.get_u16_le()?;
28328        __struct.servo16_raw = buf.get_u16_le()?;
28329        Ok(__struct)
28330    }
28331    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28332        let mut __tmp = BytesMut::new(bytes);
28333        #[allow(clippy::absurd_extreme_comparisons)]
28334        #[allow(unused_comparisons)]
28335        if __tmp.remaining() < Self::ENCODED_LEN {
28336            panic!(
28337                "buffer is too small (need {} bytes, but got {})",
28338                Self::ENCODED_LEN,
28339                __tmp.remaining(),
28340            )
28341        }
28342        __tmp.put_u32_le(self.time_usec);
28343        __tmp.put_u16_le(self.servo1_raw);
28344        __tmp.put_u16_le(self.servo2_raw);
28345        __tmp.put_u16_le(self.servo3_raw);
28346        __tmp.put_u16_le(self.servo4_raw);
28347        __tmp.put_u16_le(self.servo5_raw);
28348        __tmp.put_u16_le(self.servo6_raw);
28349        __tmp.put_u16_le(self.servo7_raw);
28350        __tmp.put_u16_le(self.servo8_raw);
28351        __tmp.put_u8(self.port);
28352        if matches!(version, MavlinkVersion::V2) {
28353            __tmp.put_u16_le(self.servo9_raw);
28354            __tmp.put_u16_le(self.servo10_raw);
28355            __tmp.put_u16_le(self.servo11_raw);
28356            __tmp.put_u16_le(self.servo12_raw);
28357            __tmp.put_u16_le(self.servo13_raw);
28358            __tmp.put_u16_le(self.servo14_raw);
28359            __tmp.put_u16_le(self.servo15_raw);
28360            __tmp.put_u16_le(self.servo16_raw);
28361            let len = __tmp.len();
28362            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28363        } else {
28364            __tmp.len()
28365        }
28366    }
28367}
28368#[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
28369#[doc = ""]
28370#[doc = "ID: 256"]
28371#[derive(Debug, Clone, PartialEq)]
28372#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28373#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28374#[cfg_attr(feature = "ts", derive(TS))]
28375#[cfg_attr(feature = "ts", ts(export))]
28376pub struct SETUP_SIGNING_DATA {
28377    #[doc = "initial timestamp"]
28378    pub initial_timestamp: u64,
28379    #[doc = "system id of the target"]
28380    pub target_system: u8,
28381    #[doc = "component ID of the target"]
28382    pub target_component: u8,
28383    #[doc = "signing key"]
28384    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28385    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28386    pub secret_key: [u8; 32],
28387}
28388impl SETUP_SIGNING_DATA {
28389    pub const ENCODED_LEN: usize = 42usize;
28390    pub const DEFAULT: Self = Self {
28391        initial_timestamp: 0_u64,
28392        target_system: 0_u8,
28393        target_component: 0_u8,
28394        secret_key: [0_u8; 32usize],
28395    };
28396    #[cfg(feature = "arbitrary")]
28397    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28398        use arbitrary::{Arbitrary, Unstructured};
28399        let mut buf = [0u8; 1024];
28400        rng.fill_bytes(&mut buf);
28401        let mut unstructured = Unstructured::new(&buf);
28402        Self::arbitrary(&mut unstructured).unwrap_or_default()
28403    }
28404}
28405impl Default for SETUP_SIGNING_DATA {
28406    fn default() -> Self {
28407        Self::DEFAULT.clone()
28408    }
28409}
28410impl MessageData for SETUP_SIGNING_DATA {
28411    type Message = MavMessage;
28412    const ID: u32 = 256u32;
28413    const NAME: &'static str = "SETUP_SIGNING";
28414    const EXTRA_CRC: u8 = 71u8;
28415    const ENCODED_LEN: usize = 42usize;
28416    fn deser(
28417        _version: MavlinkVersion,
28418        __input: &[u8],
28419    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28420        let avail_len = __input.len();
28421        let mut payload_buf = [0; Self::ENCODED_LEN];
28422        let mut buf = if avail_len < Self::ENCODED_LEN {
28423            payload_buf[0..avail_len].copy_from_slice(__input);
28424            Bytes::new(&payload_buf)
28425        } else {
28426            Bytes::new(__input)
28427        };
28428        let mut __struct = Self::default();
28429        __struct.initial_timestamp = buf.get_u64_le()?;
28430        __struct.target_system = buf.get_u8()?;
28431        __struct.target_component = buf.get_u8()?;
28432        for v in &mut __struct.secret_key {
28433            let val = buf.get_u8()?;
28434            *v = val;
28435        }
28436        Ok(__struct)
28437    }
28438    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28439        let mut __tmp = BytesMut::new(bytes);
28440        #[allow(clippy::absurd_extreme_comparisons)]
28441        #[allow(unused_comparisons)]
28442        if __tmp.remaining() < Self::ENCODED_LEN {
28443            panic!(
28444                "buffer is too small (need {} bytes, but got {})",
28445                Self::ENCODED_LEN,
28446                __tmp.remaining(),
28447            )
28448        }
28449        __tmp.put_u64_le(self.initial_timestamp);
28450        __tmp.put_u8(self.target_system);
28451        __tmp.put_u8(self.target_component);
28452        for val in &self.secret_key {
28453            __tmp.put_u8(*val);
28454        }
28455        if matches!(version, MavlinkVersion::V2) {
28456            let len = __tmp.len();
28457            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28458        } else {
28459            __tmp.len()
28460        }
28461    }
28462}
28463#[doc = "Set the vehicle attitude and body angular rates."]
28464#[doc = ""]
28465#[doc = "ID: 139"]
28466#[derive(Debug, Clone, PartialEq)]
28467#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28468#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28469#[cfg_attr(feature = "ts", derive(TS))]
28470#[cfg_attr(feature = "ts", ts(export))]
28471pub struct SET_ACTUATOR_CONTROL_TARGET_DATA {
28472    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
28473    pub time_usec: u64,
28474    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
28475    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28476    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28477    pub controls: [f32; 8],
28478    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
28479    pub group_mlx: u8,
28480    #[doc = "System ID"]
28481    pub target_system: u8,
28482    #[doc = "Component ID"]
28483    pub target_component: u8,
28484}
28485impl SET_ACTUATOR_CONTROL_TARGET_DATA {
28486    pub const ENCODED_LEN: usize = 43usize;
28487    pub const DEFAULT: Self = Self {
28488        time_usec: 0_u64,
28489        controls: [0.0_f32; 8usize],
28490        group_mlx: 0_u8,
28491        target_system: 0_u8,
28492        target_component: 0_u8,
28493    };
28494    #[cfg(feature = "arbitrary")]
28495    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28496        use arbitrary::{Arbitrary, Unstructured};
28497        let mut buf = [0u8; 1024];
28498        rng.fill_bytes(&mut buf);
28499        let mut unstructured = Unstructured::new(&buf);
28500        Self::arbitrary(&mut unstructured).unwrap_or_default()
28501    }
28502}
28503impl Default for SET_ACTUATOR_CONTROL_TARGET_DATA {
28504    fn default() -> Self {
28505        Self::DEFAULT.clone()
28506    }
28507}
28508impl MessageData for SET_ACTUATOR_CONTROL_TARGET_DATA {
28509    type Message = MavMessage;
28510    const ID: u32 = 139u32;
28511    const NAME: &'static str = "SET_ACTUATOR_CONTROL_TARGET";
28512    const EXTRA_CRC: u8 = 168u8;
28513    const ENCODED_LEN: usize = 43usize;
28514    fn deser(
28515        _version: MavlinkVersion,
28516        __input: &[u8],
28517    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28518        let avail_len = __input.len();
28519        let mut payload_buf = [0; Self::ENCODED_LEN];
28520        let mut buf = if avail_len < Self::ENCODED_LEN {
28521            payload_buf[0..avail_len].copy_from_slice(__input);
28522            Bytes::new(&payload_buf)
28523        } else {
28524            Bytes::new(__input)
28525        };
28526        let mut __struct = Self::default();
28527        __struct.time_usec = buf.get_u64_le()?;
28528        for v in &mut __struct.controls {
28529            let val = buf.get_f32_le()?;
28530            *v = val;
28531        }
28532        __struct.group_mlx = buf.get_u8()?;
28533        __struct.target_system = buf.get_u8()?;
28534        __struct.target_component = buf.get_u8()?;
28535        Ok(__struct)
28536    }
28537    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28538        let mut __tmp = BytesMut::new(bytes);
28539        #[allow(clippy::absurd_extreme_comparisons)]
28540        #[allow(unused_comparisons)]
28541        if __tmp.remaining() < Self::ENCODED_LEN {
28542            panic!(
28543                "buffer is too small (need {} bytes, but got {})",
28544                Self::ENCODED_LEN,
28545                __tmp.remaining(),
28546            )
28547        }
28548        __tmp.put_u64_le(self.time_usec);
28549        for val in &self.controls {
28550            __tmp.put_f32_le(*val);
28551        }
28552        __tmp.put_u8(self.group_mlx);
28553        __tmp.put_u8(self.target_system);
28554        __tmp.put_u8(self.target_component);
28555        if matches!(version, MavlinkVersion::V2) {
28556            let len = __tmp.len();
28557            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28558        } else {
28559            __tmp.len()
28560        }
28561    }
28562}
28563#[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
28564#[doc = ""]
28565#[doc = "ID: 82"]
28566#[derive(Debug, Clone, PartialEq)]
28567#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28568#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28569#[cfg_attr(feature = "ts", derive(TS))]
28570#[cfg_attr(feature = "ts", ts(export))]
28571pub struct SET_ATTITUDE_TARGET_DATA {
28572    #[doc = "Timestamp (time since system boot)."]
28573    pub time_boot_ms: u32,
28574    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0) from MAV_FRAME_LOCAL_NED to MAV_FRAME_BODY_FRD"]
28575    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28576    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28577    pub q: [f32; 4],
28578    #[doc = "Body roll rate"]
28579    pub body_roll_rate: f32,
28580    #[doc = "Body pitch rate"]
28581    pub body_pitch_rate: f32,
28582    #[doc = "Body yaw rate"]
28583    pub body_yaw_rate: f32,
28584    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
28585    pub thrust: f32,
28586    #[doc = "System ID"]
28587    pub target_system: u8,
28588    #[doc = "Component ID"]
28589    pub target_component: u8,
28590    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
28591    pub type_mask: AttitudeTargetTypemask,
28592    #[doc = "3D thrust setpoint in the body NED frame, normalized to -1 .. 1"]
28593    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28594    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28595    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28596    pub thrust_body: [f32; 3],
28597}
28598impl SET_ATTITUDE_TARGET_DATA {
28599    pub const ENCODED_LEN: usize = 51usize;
28600    pub const DEFAULT: Self = Self {
28601        time_boot_ms: 0_u32,
28602        q: [0.0_f32; 4usize],
28603        body_roll_rate: 0.0_f32,
28604        body_pitch_rate: 0.0_f32,
28605        body_yaw_rate: 0.0_f32,
28606        thrust: 0.0_f32,
28607        target_system: 0_u8,
28608        target_component: 0_u8,
28609        type_mask: AttitudeTargetTypemask::DEFAULT,
28610        thrust_body: [0.0_f32; 3usize],
28611    };
28612    #[cfg(feature = "arbitrary")]
28613    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28614        use arbitrary::{Arbitrary, Unstructured};
28615        let mut buf = [0u8; 1024];
28616        rng.fill_bytes(&mut buf);
28617        let mut unstructured = Unstructured::new(&buf);
28618        Self::arbitrary(&mut unstructured).unwrap_or_default()
28619    }
28620}
28621impl Default for SET_ATTITUDE_TARGET_DATA {
28622    fn default() -> Self {
28623        Self::DEFAULT.clone()
28624    }
28625}
28626impl MessageData for SET_ATTITUDE_TARGET_DATA {
28627    type Message = MavMessage;
28628    const ID: u32 = 82u32;
28629    const NAME: &'static str = "SET_ATTITUDE_TARGET";
28630    const EXTRA_CRC: u8 = 49u8;
28631    const ENCODED_LEN: usize = 51usize;
28632    fn deser(
28633        _version: MavlinkVersion,
28634        __input: &[u8],
28635    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28636        let avail_len = __input.len();
28637        let mut payload_buf = [0; Self::ENCODED_LEN];
28638        let mut buf = if avail_len < Self::ENCODED_LEN {
28639            payload_buf[0..avail_len].copy_from_slice(__input);
28640            Bytes::new(&payload_buf)
28641        } else {
28642            Bytes::new(__input)
28643        };
28644        let mut __struct = Self::default();
28645        __struct.time_boot_ms = buf.get_u32_le()?;
28646        for v in &mut __struct.q {
28647            let val = buf.get_f32_le()?;
28648            *v = val;
28649        }
28650        __struct.body_roll_rate = buf.get_f32_le()?;
28651        __struct.body_pitch_rate = buf.get_f32_le()?;
28652        __struct.body_yaw_rate = buf.get_f32_le()?;
28653        __struct.thrust = buf.get_f32_le()?;
28654        __struct.target_system = buf.get_u8()?;
28655        __struct.target_component = buf.get_u8()?;
28656        let tmp = buf.get_u8()?;
28657        __struct.type_mask =
28658            AttitudeTargetTypemask::from_bits(tmp as <AttitudeTargetTypemask as Flags>::Bits)
28659                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28660                    flag_type: "AttitudeTargetTypemask",
28661                    value: tmp as u64,
28662                })?;
28663        for v in &mut __struct.thrust_body {
28664            let val = buf.get_f32_le()?;
28665            *v = val;
28666        }
28667        Ok(__struct)
28668    }
28669    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28670        let mut __tmp = BytesMut::new(bytes);
28671        #[allow(clippy::absurd_extreme_comparisons)]
28672        #[allow(unused_comparisons)]
28673        if __tmp.remaining() < Self::ENCODED_LEN {
28674            panic!(
28675                "buffer is too small (need {} bytes, but got {})",
28676                Self::ENCODED_LEN,
28677                __tmp.remaining(),
28678            )
28679        }
28680        __tmp.put_u32_le(self.time_boot_ms);
28681        for val in &self.q {
28682            __tmp.put_f32_le(*val);
28683        }
28684        __tmp.put_f32_le(self.body_roll_rate);
28685        __tmp.put_f32_le(self.body_pitch_rate);
28686        __tmp.put_f32_le(self.body_yaw_rate);
28687        __tmp.put_f32_le(self.thrust);
28688        __tmp.put_u8(self.target_system);
28689        __tmp.put_u8(self.target_component);
28690        __tmp.put_u8(self.type_mask.bits() as u8);
28691        if matches!(version, MavlinkVersion::V2) {
28692            for val in &self.thrust_body {
28693                __tmp.put_f32_le(*val);
28694            }
28695            let len = __tmp.len();
28696            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28697        } else {
28698            __tmp.len()
28699        }
28700    }
28701}
28702#[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
28703#[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
28704#[doc = ""]
28705#[doc = "ID: 48"]
28706#[derive(Debug, Clone, PartialEq)]
28707#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28708#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28709#[cfg_attr(feature = "ts", derive(TS))]
28710#[cfg_attr(feature = "ts", ts(export))]
28711pub struct SET_GPS_GLOBAL_ORIGIN_DATA {
28712    #[doc = "Latitude (WGS84)"]
28713    pub latitude: i32,
28714    #[doc = "Longitude (WGS84)"]
28715    pub longitude: i32,
28716    #[doc = "Altitude (MSL). Positive for up."]
28717    pub altitude: i32,
28718    #[doc = "System ID"]
28719    pub target_system: u8,
28720    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
28721    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28722    pub time_usec: u64,
28723}
28724impl SET_GPS_GLOBAL_ORIGIN_DATA {
28725    pub const ENCODED_LEN: usize = 21usize;
28726    pub const DEFAULT: Self = Self {
28727        latitude: 0_i32,
28728        longitude: 0_i32,
28729        altitude: 0_i32,
28730        target_system: 0_u8,
28731        time_usec: 0_u64,
28732    };
28733    #[cfg(feature = "arbitrary")]
28734    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28735        use arbitrary::{Arbitrary, Unstructured};
28736        let mut buf = [0u8; 1024];
28737        rng.fill_bytes(&mut buf);
28738        let mut unstructured = Unstructured::new(&buf);
28739        Self::arbitrary(&mut unstructured).unwrap_or_default()
28740    }
28741}
28742impl Default for SET_GPS_GLOBAL_ORIGIN_DATA {
28743    fn default() -> Self {
28744        Self::DEFAULT.clone()
28745    }
28746}
28747impl MessageData for SET_GPS_GLOBAL_ORIGIN_DATA {
28748    type Message = MavMessage;
28749    const ID: u32 = 48u32;
28750    const NAME: &'static str = "SET_GPS_GLOBAL_ORIGIN";
28751    const EXTRA_CRC: u8 = 41u8;
28752    const ENCODED_LEN: usize = 21usize;
28753    fn deser(
28754        _version: MavlinkVersion,
28755        __input: &[u8],
28756    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28757        let avail_len = __input.len();
28758        let mut payload_buf = [0; Self::ENCODED_LEN];
28759        let mut buf = if avail_len < Self::ENCODED_LEN {
28760            payload_buf[0..avail_len].copy_from_slice(__input);
28761            Bytes::new(&payload_buf)
28762        } else {
28763            Bytes::new(__input)
28764        };
28765        let mut __struct = Self::default();
28766        __struct.latitude = buf.get_i32_le()?;
28767        __struct.longitude = buf.get_i32_le()?;
28768        __struct.altitude = buf.get_i32_le()?;
28769        __struct.target_system = buf.get_u8()?;
28770        __struct.time_usec = buf.get_u64_le()?;
28771        Ok(__struct)
28772    }
28773    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28774        let mut __tmp = BytesMut::new(bytes);
28775        #[allow(clippy::absurd_extreme_comparisons)]
28776        #[allow(unused_comparisons)]
28777        if __tmp.remaining() < Self::ENCODED_LEN {
28778            panic!(
28779                "buffer is too small (need {} bytes, but got {})",
28780                Self::ENCODED_LEN,
28781                __tmp.remaining(),
28782            )
28783        }
28784        __tmp.put_i32_le(self.latitude);
28785        __tmp.put_i32_le(self.longitude);
28786        __tmp.put_i32_le(self.altitude);
28787        __tmp.put_u8(self.target_system);
28788        if matches!(version, MavlinkVersion::V2) {
28789            __tmp.put_u64_le(self.time_usec);
28790            let len = __tmp.len();
28791            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28792        } else {
28793            __tmp.len()
28794        }
28795    }
28796}
28797#[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
28798#[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
28799#[doc = ""]
28800#[doc = "ID: 243"]
28801#[derive(Debug, Clone, PartialEq)]
28802#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28803#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28804#[cfg_attr(feature = "ts", derive(TS))]
28805#[cfg_attr(feature = "ts", ts(export))]
28806pub struct SET_HOME_POSITION_DATA {
28807    #[doc = "Latitude (WGS84)"]
28808    pub latitude: i32,
28809    #[doc = "Longitude (WGS84)"]
28810    pub longitude: i32,
28811    #[doc = "Altitude (MSL). Positive for up."]
28812    pub altitude: i32,
28813    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
28814    pub x: f32,
28815    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
28816    pub y: f32,
28817    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
28818    pub z: f32,
28819    #[doc = "World to surface normal and heading transformation of the takeoff position. Used to indicate the heading and slope of the ground"]
28820    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28821    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
28822    pub q: [f32; 4],
28823    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
28824    pub approach_x: f32,
28825    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
28826    pub approach_y: f32,
28827    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
28828    pub approach_z: f32,
28829    #[doc = "System ID."]
28830    pub target_system: u8,
28831    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
28832    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28833    pub time_usec: u64,
28834}
28835impl SET_HOME_POSITION_DATA {
28836    pub const ENCODED_LEN: usize = 61usize;
28837    pub const DEFAULT: Self = Self {
28838        latitude: 0_i32,
28839        longitude: 0_i32,
28840        altitude: 0_i32,
28841        x: 0.0_f32,
28842        y: 0.0_f32,
28843        z: 0.0_f32,
28844        q: [0.0_f32; 4usize],
28845        approach_x: 0.0_f32,
28846        approach_y: 0.0_f32,
28847        approach_z: 0.0_f32,
28848        target_system: 0_u8,
28849        time_usec: 0_u64,
28850    };
28851    #[cfg(feature = "arbitrary")]
28852    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28853        use arbitrary::{Arbitrary, Unstructured};
28854        let mut buf = [0u8; 1024];
28855        rng.fill_bytes(&mut buf);
28856        let mut unstructured = Unstructured::new(&buf);
28857        Self::arbitrary(&mut unstructured).unwrap_or_default()
28858    }
28859}
28860impl Default for SET_HOME_POSITION_DATA {
28861    fn default() -> Self {
28862        Self::DEFAULT.clone()
28863    }
28864}
28865impl MessageData for SET_HOME_POSITION_DATA {
28866    type Message = MavMessage;
28867    const ID: u32 = 243u32;
28868    const NAME: &'static str = "SET_HOME_POSITION";
28869    const EXTRA_CRC: u8 = 85u8;
28870    const ENCODED_LEN: usize = 61usize;
28871    fn deser(
28872        _version: MavlinkVersion,
28873        __input: &[u8],
28874    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28875        let avail_len = __input.len();
28876        let mut payload_buf = [0; Self::ENCODED_LEN];
28877        let mut buf = if avail_len < Self::ENCODED_LEN {
28878            payload_buf[0..avail_len].copy_from_slice(__input);
28879            Bytes::new(&payload_buf)
28880        } else {
28881            Bytes::new(__input)
28882        };
28883        let mut __struct = Self::default();
28884        __struct.latitude = buf.get_i32_le()?;
28885        __struct.longitude = buf.get_i32_le()?;
28886        __struct.altitude = buf.get_i32_le()?;
28887        __struct.x = buf.get_f32_le()?;
28888        __struct.y = buf.get_f32_le()?;
28889        __struct.z = buf.get_f32_le()?;
28890        for v in &mut __struct.q {
28891            let val = buf.get_f32_le()?;
28892            *v = val;
28893        }
28894        __struct.approach_x = buf.get_f32_le()?;
28895        __struct.approach_y = buf.get_f32_le()?;
28896        __struct.approach_z = buf.get_f32_le()?;
28897        __struct.target_system = buf.get_u8()?;
28898        __struct.time_usec = buf.get_u64_le()?;
28899        Ok(__struct)
28900    }
28901    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28902        let mut __tmp = BytesMut::new(bytes);
28903        #[allow(clippy::absurd_extreme_comparisons)]
28904        #[allow(unused_comparisons)]
28905        if __tmp.remaining() < Self::ENCODED_LEN {
28906            panic!(
28907                "buffer is too small (need {} bytes, but got {})",
28908                Self::ENCODED_LEN,
28909                __tmp.remaining(),
28910            )
28911        }
28912        __tmp.put_i32_le(self.latitude);
28913        __tmp.put_i32_le(self.longitude);
28914        __tmp.put_i32_le(self.altitude);
28915        __tmp.put_f32_le(self.x);
28916        __tmp.put_f32_le(self.y);
28917        __tmp.put_f32_le(self.z);
28918        for val in &self.q {
28919            __tmp.put_f32_le(*val);
28920        }
28921        __tmp.put_f32_le(self.approach_x);
28922        __tmp.put_f32_le(self.approach_y);
28923        __tmp.put_f32_le(self.approach_z);
28924        __tmp.put_u8(self.target_system);
28925        if matches!(version, MavlinkVersion::V2) {
28926            __tmp.put_u64_le(self.time_usec);
28927            let len = __tmp.len();
28928            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28929        } else {
28930            __tmp.len()
28931        }
28932    }
28933}
28934#[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
28935#[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
28936#[doc = ""]
28937#[doc = "ID: 11"]
28938#[derive(Debug, Clone, PartialEq)]
28939#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28940#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28941#[cfg_attr(feature = "ts", derive(TS))]
28942#[cfg_attr(feature = "ts", ts(export))]
28943pub struct SET_MODE_DATA {
28944    #[doc = "The new autopilot-specific mode. This field can be ignored by an autopilot."]
28945    pub custom_mode: u32,
28946    #[doc = "The system setting the mode"]
28947    pub target_system: u8,
28948    #[doc = "The new base mode."]
28949    pub base_mode: MavMode,
28950}
28951impl SET_MODE_DATA {
28952    pub const ENCODED_LEN: usize = 6usize;
28953    pub const DEFAULT: Self = Self {
28954        custom_mode: 0_u32,
28955        target_system: 0_u8,
28956        base_mode: MavMode::DEFAULT,
28957    };
28958    #[cfg(feature = "arbitrary")]
28959    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28960        use arbitrary::{Arbitrary, Unstructured};
28961        let mut buf = [0u8; 1024];
28962        rng.fill_bytes(&mut buf);
28963        let mut unstructured = Unstructured::new(&buf);
28964        Self::arbitrary(&mut unstructured).unwrap_or_default()
28965    }
28966}
28967impl Default for SET_MODE_DATA {
28968    fn default() -> Self {
28969        Self::DEFAULT.clone()
28970    }
28971}
28972impl MessageData for SET_MODE_DATA {
28973    type Message = MavMessage;
28974    const ID: u32 = 11u32;
28975    const NAME: &'static str = "SET_MODE";
28976    const EXTRA_CRC: u8 = 89u8;
28977    const ENCODED_LEN: usize = 6usize;
28978    fn deser(
28979        _version: MavlinkVersion,
28980        __input: &[u8],
28981    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28982        let avail_len = __input.len();
28983        let mut payload_buf = [0; Self::ENCODED_LEN];
28984        let mut buf = if avail_len < Self::ENCODED_LEN {
28985            payload_buf[0..avail_len].copy_from_slice(__input);
28986            Bytes::new(&payload_buf)
28987        } else {
28988            Bytes::new(__input)
28989        };
28990        let mut __struct = Self::default();
28991        __struct.custom_mode = buf.get_u32_le()?;
28992        __struct.target_system = buf.get_u8()?;
28993        let tmp = buf.get_u8()?;
28994        __struct.base_mode =
28995            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28996                enum_type: "MavMode",
28997                value: tmp as u64,
28998            })?;
28999        Ok(__struct)
29000    }
29001    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29002        let mut __tmp = BytesMut::new(bytes);
29003        #[allow(clippy::absurd_extreme_comparisons)]
29004        #[allow(unused_comparisons)]
29005        if __tmp.remaining() < Self::ENCODED_LEN {
29006            panic!(
29007                "buffer is too small (need {} bytes, but got {})",
29008                Self::ENCODED_LEN,
29009                __tmp.remaining(),
29010            )
29011        }
29012        __tmp.put_u32_le(self.custom_mode);
29013        __tmp.put_u8(self.target_system);
29014        __tmp.put_u8(self.base_mode as u8);
29015        if matches!(version, MavlinkVersion::V2) {
29016            let len = __tmp.len();
29017            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29018        } else {
29019            __tmp.len()
29020        }
29021    }
29022}
29023#[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
29024#[doc = ""]
29025#[doc = "ID: 86"]
29026#[derive(Debug, Clone, PartialEq)]
29027#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29028#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29029#[cfg_attr(feature = "ts", derive(TS))]
29030#[cfg_attr(feature = "ts", ts(export))]
29031pub struct SET_POSITION_TARGET_GLOBAL_INT_DATA {
29032    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
29033    pub time_boot_ms: u32,
29034    #[doc = "Latitude in WGS84 frame"]
29035    pub lat_int: i32,
29036    #[doc = "Longitude in WGS84 frame"]
29037    pub lon_int: i32,
29038    #[doc = "Altitude (MSL, Relative to home, or AGL - depending on frame)"]
29039    pub alt: f32,
29040    #[doc = "X velocity in NED frame"]
29041    pub vx: f32,
29042    #[doc = "Y velocity in NED frame"]
29043    pub vy: f32,
29044    #[doc = "Z velocity in NED frame"]
29045    pub vz: f32,
29046    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
29047    pub afx: f32,
29048    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
29049    pub afy: f32,
29050    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
29051    pub afz: f32,
29052    #[doc = "yaw setpoint"]
29053    pub yaw: f32,
29054    #[doc = "yaw rate setpoint"]
29055    pub yaw_rate: f32,
29056    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
29057    pub type_mask: PositionTargetTypemask,
29058    #[doc = "System ID"]
29059    pub target_system: u8,
29060    #[doc = "Component ID"]
29061    pub target_component: u8,
29062    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
29063    pub coordinate_frame: MavFrame,
29064}
29065impl SET_POSITION_TARGET_GLOBAL_INT_DATA {
29066    pub const ENCODED_LEN: usize = 53usize;
29067    pub const DEFAULT: Self = Self {
29068        time_boot_ms: 0_u32,
29069        lat_int: 0_i32,
29070        lon_int: 0_i32,
29071        alt: 0.0_f32,
29072        vx: 0.0_f32,
29073        vy: 0.0_f32,
29074        vz: 0.0_f32,
29075        afx: 0.0_f32,
29076        afy: 0.0_f32,
29077        afz: 0.0_f32,
29078        yaw: 0.0_f32,
29079        yaw_rate: 0.0_f32,
29080        type_mask: PositionTargetTypemask::DEFAULT,
29081        target_system: 0_u8,
29082        target_component: 0_u8,
29083        coordinate_frame: MavFrame::DEFAULT,
29084    };
29085    #[cfg(feature = "arbitrary")]
29086    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29087        use arbitrary::{Arbitrary, Unstructured};
29088        let mut buf = [0u8; 1024];
29089        rng.fill_bytes(&mut buf);
29090        let mut unstructured = Unstructured::new(&buf);
29091        Self::arbitrary(&mut unstructured).unwrap_or_default()
29092    }
29093}
29094impl Default for SET_POSITION_TARGET_GLOBAL_INT_DATA {
29095    fn default() -> Self {
29096        Self::DEFAULT.clone()
29097    }
29098}
29099impl MessageData for SET_POSITION_TARGET_GLOBAL_INT_DATA {
29100    type Message = MavMessage;
29101    const ID: u32 = 86u32;
29102    const NAME: &'static str = "SET_POSITION_TARGET_GLOBAL_INT";
29103    const EXTRA_CRC: u8 = 5u8;
29104    const ENCODED_LEN: usize = 53usize;
29105    fn deser(
29106        _version: MavlinkVersion,
29107        __input: &[u8],
29108    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29109        let avail_len = __input.len();
29110        let mut payload_buf = [0; Self::ENCODED_LEN];
29111        let mut buf = if avail_len < Self::ENCODED_LEN {
29112            payload_buf[0..avail_len].copy_from_slice(__input);
29113            Bytes::new(&payload_buf)
29114        } else {
29115            Bytes::new(__input)
29116        };
29117        let mut __struct = Self::default();
29118        __struct.time_boot_ms = buf.get_u32_le()?;
29119        __struct.lat_int = buf.get_i32_le()?;
29120        __struct.lon_int = buf.get_i32_le()?;
29121        __struct.alt = buf.get_f32_le()?;
29122        __struct.vx = buf.get_f32_le()?;
29123        __struct.vy = buf.get_f32_le()?;
29124        __struct.vz = buf.get_f32_le()?;
29125        __struct.afx = buf.get_f32_le()?;
29126        __struct.afy = buf.get_f32_le()?;
29127        __struct.afz = buf.get_f32_le()?;
29128        __struct.yaw = buf.get_f32_le()?;
29129        __struct.yaw_rate = buf.get_f32_le()?;
29130        let tmp = buf.get_u16_le()?;
29131        __struct.type_mask =
29132            PositionTargetTypemask::from_bits(tmp as <PositionTargetTypemask as Flags>::Bits)
29133                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29134                    flag_type: "PositionTargetTypemask",
29135                    value: tmp as u64,
29136                })?;
29137        __struct.target_system = buf.get_u8()?;
29138        __struct.target_component = buf.get_u8()?;
29139        let tmp = buf.get_u8()?;
29140        __struct.coordinate_frame =
29141            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29142                enum_type: "MavFrame",
29143                value: tmp as u64,
29144            })?;
29145        Ok(__struct)
29146    }
29147    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29148        let mut __tmp = BytesMut::new(bytes);
29149        #[allow(clippy::absurd_extreme_comparisons)]
29150        #[allow(unused_comparisons)]
29151        if __tmp.remaining() < Self::ENCODED_LEN {
29152            panic!(
29153                "buffer is too small (need {} bytes, but got {})",
29154                Self::ENCODED_LEN,
29155                __tmp.remaining(),
29156            )
29157        }
29158        __tmp.put_u32_le(self.time_boot_ms);
29159        __tmp.put_i32_le(self.lat_int);
29160        __tmp.put_i32_le(self.lon_int);
29161        __tmp.put_f32_le(self.alt);
29162        __tmp.put_f32_le(self.vx);
29163        __tmp.put_f32_le(self.vy);
29164        __tmp.put_f32_le(self.vz);
29165        __tmp.put_f32_le(self.afx);
29166        __tmp.put_f32_le(self.afy);
29167        __tmp.put_f32_le(self.afz);
29168        __tmp.put_f32_le(self.yaw);
29169        __tmp.put_f32_le(self.yaw_rate);
29170        __tmp.put_u16_le(self.type_mask.bits() as u16);
29171        __tmp.put_u8(self.target_system);
29172        __tmp.put_u8(self.target_component);
29173        __tmp.put_u8(self.coordinate_frame as u8);
29174        if matches!(version, MavlinkVersion::V2) {
29175            let len = __tmp.len();
29176            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29177        } else {
29178            __tmp.len()
29179        }
29180    }
29181}
29182#[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
29183#[doc = ""]
29184#[doc = "ID: 84"]
29185#[derive(Debug, Clone, PartialEq)]
29186#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29187#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29188#[cfg_attr(feature = "ts", derive(TS))]
29189#[cfg_attr(feature = "ts", ts(export))]
29190pub struct SET_POSITION_TARGET_LOCAL_NED_DATA {
29191    #[doc = "Timestamp (time since system boot)."]
29192    pub time_boot_ms: u32,
29193    #[doc = "X Position in NED frame"]
29194    pub x: f32,
29195    #[doc = "Y Position in NED frame"]
29196    pub y: f32,
29197    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
29198    pub z: f32,
29199    #[doc = "X velocity in NED frame"]
29200    pub vx: f32,
29201    #[doc = "Y velocity in NED frame"]
29202    pub vy: f32,
29203    #[doc = "Z velocity in NED frame"]
29204    pub vz: f32,
29205    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
29206    pub afx: f32,
29207    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
29208    pub afy: f32,
29209    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
29210    pub afz: f32,
29211    #[doc = "yaw setpoint"]
29212    pub yaw: f32,
29213    #[doc = "yaw rate setpoint"]
29214    pub yaw_rate: f32,
29215    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
29216    pub type_mask: PositionTargetTypemask,
29217    #[doc = "System ID"]
29218    pub target_system: u8,
29219    #[doc = "Component ID"]
29220    pub target_component: u8,
29221    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
29222    pub coordinate_frame: MavFrame,
29223}
29224impl SET_POSITION_TARGET_LOCAL_NED_DATA {
29225    pub const ENCODED_LEN: usize = 53usize;
29226    pub const DEFAULT: Self = Self {
29227        time_boot_ms: 0_u32,
29228        x: 0.0_f32,
29229        y: 0.0_f32,
29230        z: 0.0_f32,
29231        vx: 0.0_f32,
29232        vy: 0.0_f32,
29233        vz: 0.0_f32,
29234        afx: 0.0_f32,
29235        afy: 0.0_f32,
29236        afz: 0.0_f32,
29237        yaw: 0.0_f32,
29238        yaw_rate: 0.0_f32,
29239        type_mask: PositionTargetTypemask::DEFAULT,
29240        target_system: 0_u8,
29241        target_component: 0_u8,
29242        coordinate_frame: MavFrame::DEFAULT,
29243    };
29244    #[cfg(feature = "arbitrary")]
29245    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29246        use arbitrary::{Arbitrary, Unstructured};
29247        let mut buf = [0u8; 1024];
29248        rng.fill_bytes(&mut buf);
29249        let mut unstructured = Unstructured::new(&buf);
29250        Self::arbitrary(&mut unstructured).unwrap_or_default()
29251    }
29252}
29253impl Default for SET_POSITION_TARGET_LOCAL_NED_DATA {
29254    fn default() -> Self {
29255        Self::DEFAULT.clone()
29256    }
29257}
29258impl MessageData for SET_POSITION_TARGET_LOCAL_NED_DATA {
29259    type Message = MavMessage;
29260    const ID: u32 = 84u32;
29261    const NAME: &'static str = "SET_POSITION_TARGET_LOCAL_NED";
29262    const EXTRA_CRC: u8 = 143u8;
29263    const ENCODED_LEN: usize = 53usize;
29264    fn deser(
29265        _version: MavlinkVersion,
29266        __input: &[u8],
29267    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29268        let avail_len = __input.len();
29269        let mut payload_buf = [0; Self::ENCODED_LEN];
29270        let mut buf = if avail_len < Self::ENCODED_LEN {
29271            payload_buf[0..avail_len].copy_from_slice(__input);
29272            Bytes::new(&payload_buf)
29273        } else {
29274            Bytes::new(__input)
29275        };
29276        let mut __struct = Self::default();
29277        __struct.time_boot_ms = buf.get_u32_le()?;
29278        __struct.x = buf.get_f32_le()?;
29279        __struct.y = buf.get_f32_le()?;
29280        __struct.z = buf.get_f32_le()?;
29281        __struct.vx = buf.get_f32_le()?;
29282        __struct.vy = buf.get_f32_le()?;
29283        __struct.vz = buf.get_f32_le()?;
29284        __struct.afx = buf.get_f32_le()?;
29285        __struct.afy = buf.get_f32_le()?;
29286        __struct.afz = buf.get_f32_le()?;
29287        __struct.yaw = buf.get_f32_le()?;
29288        __struct.yaw_rate = buf.get_f32_le()?;
29289        let tmp = buf.get_u16_le()?;
29290        __struct.type_mask =
29291            PositionTargetTypemask::from_bits(tmp as <PositionTargetTypemask as Flags>::Bits)
29292                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29293                    flag_type: "PositionTargetTypemask",
29294                    value: tmp as u64,
29295                })?;
29296        __struct.target_system = buf.get_u8()?;
29297        __struct.target_component = buf.get_u8()?;
29298        let tmp = buf.get_u8()?;
29299        __struct.coordinate_frame =
29300            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29301                enum_type: "MavFrame",
29302                value: tmp as u64,
29303            })?;
29304        Ok(__struct)
29305    }
29306    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29307        let mut __tmp = BytesMut::new(bytes);
29308        #[allow(clippy::absurd_extreme_comparisons)]
29309        #[allow(unused_comparisons)]
29310        if __tmp.remaining() < Self::ENCODED_LEN {
29311            panic!(
29312                "buffer is too small (need {} bytes, but got {})",
29313                Self::ENCODED_LEN,
29314                __tmp.remaining(),
29315            )
29316        }
29317        __tmp.put_u32_le(self.time_boot_ms);
29318        __tmp.put_f32_le(self.x);
29319        __tmp.put_f32_le(self.y);
29320        __tmp.put_f32_le(self.z);
29321        __tmp.put_f32_le(self.vx);
29322        __tmp.put_f32_le(self.vy);
29323        __tmp.put_f32_le(self.vz);
29324        __tmp.put_f32_le(self.afx);
29325        __tmp.put_f32_le(self.afy);
29326        __tmp.put_f32_le(self.afz);
29327        __tmp.put_f32_le(self.yaw);
29328        __tmp.put_f32_le(self.yaw_rate);
29329        __tmp.put_u16_le(self.type_mask.bits() as u16);
29330        __tmp.put_u8(self.target_system);
29331        __tmp.put_u8(self.target_component);
29332        __tmp.put_u8(self.coordinate_frame as u8);
29333        if matches!(version, MavlinkVersion::V2) {
29334            let len = __tmp.len();
29335            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29336        } else {
29337            __tmp.len()
29338        }
29339    }
29340}
29341#[doc = "Set temporary maximum limits for horizontal speed, vertical speed and yaw rate.         The consumer must stream the current limits in VELOCITY_LIMITS at 1 Hz or more (when limits are being set).         The consumer should latch the limits until a new limit is received or the mode is changed."]
29342#[doc = ""]
29343#[doc = "ID: 354"]
29344#[derive(Debug, Clone, PartialEq)]
29345#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29346#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29347#[cfg_attr(feature = "ts", derive(TS))]
29348#[cfg_attr(feature = "ts", ts(export))]
29349pub struct SET_VELOCITY_LIMITS_DATA {
29350    #[doc = "Limit for horizontal movement in MAV_FRAME_LOCAL_NED. NaN: Field not used (ignore)"]
29351    pub horizontal_speed_limit: f32,
29352    #[doc = "Limit for vertical movement in MAV_FRAME_LOCAL_NED. NaN: Field not used (ignore)"]
29353    pub vertical_speed_limit: f32,
29354    #[doc = "Limit for vehicle turn rate around its yaw axis. NaN: Field not used (ignore)"]
29355    pub yaw_rate_limit: f32,
29356    #[doc = "System ID (0 for broadcast)."]
29357    pub target_system: u8,
29358    #[doc = "Component ID (0 for broadcast)."]
29359    pub target_component: u8,
29360}
29361impl SET_VELOCITY_LIMITS_DATA {
29362    pub const ENCODED_LEN: usize = 14usize;
29363    pub const DEFAULT: Self = Self {
29364        horizontal_speed_limit: 0.0_f32,
29365        vertical_speed_limit: 0.0_f32,
29366        yaw_rate_limit: 0.0_f32,
29367        target_system: 0_u8,
29368        target_component: 0_u8,
29369    };
29370    #[cfg(feature = "arbitrary")]
29371    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29372        use arbitrary::{Arbitrary, Unstructured};
29373        let mut buf = [0u8; 1024];
29374        rng.fill_bytes(&mut buf);
29375        let mut unstructured = Unstructured::new(&buf);
29376        Self::arbitrary(&mut unstructured).unwrap_or_default()
29377    }
29378}
29379impl Default for SET_VELOCITY_LIMITS_DATA {
29380    fn default() -> Self {
29381        Self::DEFAULT.clone()
29382    }
29383}
29384impl MessageData for SET_VELOCITY_LIMITS_DATA {
29385    type Message = MavMessage;
29386    const ID: u32 = 354u32;
29387    const NAME: &'static str = "SET_VELOCITY_LIMITS";
29388    const EXTRA_CRC: u8 = 210u8;
29389    const ENCODED_LEN: usize = 14usize;
29390    fn deser(
29391        _version: MavlinkVersion,
29392        __input: &[u8],
29393    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29394        let avail_len = __input.len();
29395        let mut payload_buf = [0; Self::ENCODED_LEN];
29396        let mut buf = if avail_len < Self::ENCODED_LEN {
29397            payload_buf[0..avail_len].copy_from_slice(__input);
29398            Bytes::new(&payload_buf)
29399        } else {
29400            Bytes::new(__input)
29401        };
29402        let mut __struct = Self::default();
29403        __struct.horizontal_speed_limit = buf.get_f32_le()?;
29404        __struct.vertical_speed_limit = buf.get_f32_le()?;
29405        __struct.yaw_rate_limit = buf.get_f32_le()?;
29406        __struct.target_system = buf.get_u8()?;
29407        __struct.target_component = buf.get_u8()?;
29408        Ok(__struct)
29409    }
29410    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29411        let mut __tmp = BytesMut::new(bytes);
29412        #[allow(clippy::absurd_extreme_comparisons)]
29413        #[allow(unused_comparisons)]
29414        if __tmp.remaining() < Self::ENCODED_LEN {
29415            panic!(
29416                "buffer is too small (need {} bytes, but got {})",
29417                Self::ENCODED_LEN,
29418                __tmp.remaining(),
29419            )
29420        }
29421        __tmp.put_f32_le(self.horizontal_speed_limit);
29422        __tmp.put_f32_le(self.vertical_speed_limit);
29423        __tmp.put_f32_le(self.yaw_rate_limit);
29424        __tmp.put_u8(self.target_system);
29425        __tmp.put_u8(self.target_component);
29426        if matches!(version, MavlinkVersion::V2) {
29427            let len = __tmp.len();
29428            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29429        } else {
29430            __tmp.len()
29431        }
29432    }
29433}
29434#[doc = "Status of simulation environment, if used."]
29435#[doc = ""]
29436#[doc = "ID: 108"]
29437#[derive(Debug, Clone, PartialEq)]
29438#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29439#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29440#[cfg_attr(feature = "ts", derive(TS))]
29441#[cfg_attr(feature = "ts", ts(export))]
29442pub struct SIM_STATE_DATA {
29443    #[doc = "True attitude quaternion component 1, w (1 in null-rotation)"]
29444    pub q1: f32,
29445    #[doc = "True attitude quaternion component 2, x (0 in null-rotation)"]
29446    pub q2: f32,
29447    #[doc = "True attitude quaternion component 3, y (0 in null-rotation)"]
29448    pub q3: f32,
29449    #[doc = "True attitude quaternion component 4, z (0 in null-rotation)"]
29450    pub q4: f32,
29451    #[doc = "Attitude roll expressed as Euler angles, not recommended except for human-readable outputs"]
29452    pub roll: f32,
29453    #[doc = "Attitude pitch expressed as Euler angles, not recommended except for human-readable outputs"]
29454    pub pitch: f32,
29455    #[doc = "Attitude yaw expressed as Euler angles, not recommended except for human-readable outputs"]
29456    pub yaw: f32,
29457    #[doc = "X acceleration"]
29458    pub xacc: f32,
29459    #[doc = "Y acceleration"]
29460    pub yacc: f32,
29461    #[doc = "Z acceleration"]
29462    pub zacc: f32,
29463    #[doc = "Angular speed around X axis"]
29464    pub xgyro: f32,
29465    #[doc = "Angular speed around Y axis"]
29466    pub ygyro: f32,
29467    #[doc = "Angular speed around Z axis"]
29468    pub zgyro: f32,
29469    #[doc = "Latitude (lower precision). Both this and the lat_int field should be set."]
29470    pub lat: f32,
29471    #[doc = "Longitude (lower precision). Both this and the lon_int field should be set."]
29472    pub lon: f32,
29473    #[doc = "Altitude"]
29474    pub alt: f32,
29475    #[doc = "Horizontal position standard deviation"]
29476    pub std_dev_horz: f32,
29477    #[doc = "Vertical position standard deviation"]
29478    pub std_dev_vert: f32,
29479    #[doc = "True velocity in north direction in earth-fixed NED frame"]
29480    pub vn: f32,
29481    #[doc = "True velocity in east direction in earth-fixed NED frame"]
29482    pub ve: f32,
29483    #[doc = "True velocity in down direction in earth-fixed NED frame"]
29484    pub vd: f32,
29485    #[doc = "Latitude (higher precision). If 0, recipients should use the lat field value (otherwise this field is preferred)."]
29486    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29487    pub lat_int: i32,
29488    #[doc = "Longitude (higher precision). If 0, recipients should use the lon field value (otherwise this field is preferred)."]
29489    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29490    pub lon_int: i32,
29491}
29492impl SIM_STATE_DATA {
29493    pub const ENCODED_LEN: usize = 92usize;
29494    pub const DEFAULT: Self = Self {
29495        q1: 0.0_f32,
29496        q2: 0.0_f32,
29497        q3: 0.0_f32,
29498        q4: 0.0_f32,
29499        roll: 0.0_f32,
29500        pitch: 0.0_f32,
29501        yaw: 0.0_f32,
29502        xacc: 0.0_f32,
29503        yacc: 0.0_f32,
29504        zacc: 0.0_f32,
29505        xgyro: 0.0_f32,
29506        ygyro: 0.0_f32,
29507        zgyro: 0.0_f32,
29508        lat: 0.0_f32,
29509        lon: 0.0_f32,
29510        alt: 0.0_f32,
29511        std_dev_horz: 0.0_f32,
29512        std_dev_vert: 0.0_f32,
29513        vn: 0.0_f32,
29514        ve: 0.0_f32,
29515        vd: 0.0_f32,
29516        lat_int: 0_i32,
29517        lon_int: 0_i32,
29518    };
29519    #[cfg(feature = "arbitrary")]
29520    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29521        use arbitrary::{Arbitrary, Unstructured};
29522        let mut buf = [0u8; 1024];
29523        rng.fill_bytes(&mut buf);
29524        let mut unstructured = Unstructured::new(&buf);
29525        Self::arbitrary(&mut unstructured).unwrap_or_default()
29526    }
29527}
29528impl Default for SIM_STATE_DATA {
29529    fn default() -> Self {
29530        Self::DEFAULT.clone()
29531    }
29532}
29533impl MessageData for SIM_STATE_DATA {
29534    type Message = MavMessage;
29535    const ID: u32 = 108u32;
29536    const NAME: &'static str = "SIM_STATE";
29537    const EXTRA_CRC: u8 = 32u8;
29538    const ENCODED_LEN: usize = 92usize;
29539    fn deser(
29540        _version: MavlinkVersion,
29541        __input: &[u8],
29542    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29543        let avail_len = __input.len();
29544        let mut payload_buf = [0; Self::ENCODED_LEN];
29545        let mut buf = if avail_len < Self::ENCODED_LEN {
29546            payload_buf[0..avail_len].copy_from_slice(__input);
29547            Bytes::new(&payload_buf)
29548        } else {
29549            Bytes::new(__input)
29550        };
29551        let mut __struct = Self::default();
29552        __struct.q1 = buf.get_f32_le()?;
29553        __struct.q2 = buf.get_f32_le()?;
29554        __struct.q3 = buf.get_f32_le()?;
29555        __struct.q4 = buf.get_f32_le()?;
29556        __struct.roll = buf.get_f32_le()?;
29557        __struct.pitch = buf.get_f32_le()?;
29558        __struct.yaw = buf.get_f32_le()?;
29559        __struct.xacc = buf.get_f32_le()?;
29560        __struct.yacc = buf.get_f32_le()?;
29561        __struct.zacc = buf.get_f32_le()?;
29562        __struct.xgyro = buf.get_f32_le()?;
29563        __struct.ygyro = buf.get_f32_le()?;
29564        __struct.zgyro = buf.get_f32_le()?;
29565        __struct.lat = buf.get_f32_le()?;
29566        __struct.lon = buf.get_f32_le()?;
29567        __struct.alt = buf.get_f32_le()?;
29568        __struct.std_dev_horz = buf.get_f32_le()?;
29569        __struct.std_dev_vert = buf.get_f32_le()?;
29570        __struct.vn = buf.get_f32_le()?;
29571        __struct.ve = buf.get_f32_le()?;
29572        __struct.vd = buf.get_f32_le()?;
29573        __struct.lat_int = buf.get_i32_le()?;
29574        __struct.lon_int = buf.get_i32_le()?;
29575        Ok(__struct)
29576    }
29577    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29578        let mut __tmp = BytesMut::new(bytes);
29579        #[allow(clippy::absurd_extreme_comparisons)]
29580        #[allow(unused_comparisons)]
29581        if __tmp.remaining() < Self::ENCODED_LEN {
29582            panic!(
29583                "buffer is too small (need {} bytes, but got {})",
29584                Self::ENCODED_LEN,
29585                __tmp.remaining(),
29586            )
29587        }
29588        __tmp.put_f32_le(self.q1);
29589        __tmp.put_f32_le(self.q2);
29590        __tmp.put_f32_le(self.q3);
29591        __tmp.put_f32_le(self.q4);
29592        __tmp.put_f32_le(self.roll);
29593        __tmp.put_f32_le(self.pitch);
29594        __tmp.put_f32_le(self.yaw);
29595        __tmp.put_f32_le(self.xacc);
29596        __tmp.put_f32_le(self.yacc);
29597        __tmp.put_f32_le(self.zacc);
29598        __tmp.put_f32_le(self.xgyro);
29599        __tmp.put_f32_le(self.ygyro);
29600        __tmp.put_f32_le(self.zgyro);
29601        __tmp.put_f32_le(self.lat);
29602        __tmp.put_f32_le(self.lon);
29603        __tmp.put_f32_le(self.alt);
29604        __tmp.put_f32_le(self.std_dev_horz);
29605        __tmp.put_f32_le(self.std_dev_vert);
29606        __tmp.put_f32_le(self.vn);
29607        __tmp.put_f32_le(self.ve);
29608        __tmp.put_f32_le(self.vd);
29609        if matches!(version, MavlinkVersion::V2) {
29610            __tmp.put_i32_le(self.lat_int);
29611            __tmp.put_i32_le(self.lon_int);
29612            let len = __tmp.len();
29613            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29614        } else {
29615            __tmp.len()
29616        }
29617    }
29618}
29619#[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
29620#[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
29621#[doc = ""]
29622#[doc = "ID: 370"]
29623#[derive(Debug, Clone, PartialEq)]
29624#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29625#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29626#[cfg_attr(feature = "ts", derive(TS))]
29627#[cfg_attr(feature = "ts", ts(export))]
29628pub struct SMART_BATTERY_INFO_DATA {
29629    #[doc = "Capacity when full according to manufacturer, -1: field not provided."]
29630    pub capacity_full_specification: i32,
29631    #[doc = "Capacity when full (accounting for battery degradation), -1: field not provided."]
29632    pub capacity_full: i32,
29633    #[doc = "Charge/discharge cycle count. UINT16_MAX: field not provided."]
29634    pub cycle_count: u16,
29635    #[doc = "Battery weight. 0: field not provided."]
29636    pub weight: u16,
29637    #[doc = "Minimum per-cell voltage when discharging. If not supplied set to UINT16_MAX value."]
29638    pub discharge_minimum_voltage: u16,
29639    #[doc = "Minimum per-cell voltage when charging. If not supplied set to UINT16_MAX value."]
29640    pub charging_minimum_voltage: u16,
29641    #[doc = "Minimum per-cell voltage when resting. If not supplied set to UINT16_MAX value."]
29642    pub resting_minimum_voltage: u16,
29643    #[doc = "Battery ID"]
29644    pub id: u8,
29645    #[doc = "Function of the battery"]
29646    pub battery_function: MavBatteryFunction,
29647    #[doc = "Type (chemistry) of the battery"]
29648    pub mavtype: MavBatteryType,
29649    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
29650    #[cfg_attr(feature = "ts", ts(type = "string"))]
29651    pub serial_number: CharArray<16>,
29652    #[doc = "Static device name in ASCII characters, 0 terminated. All 0: field not provided. Encode as manufacturer name then product name separated using an underscore."]
29653    #[cfg_attr(feature = "ts", ts(type = "string"))]
29654    pub device_name: CharArray<50>,
29655    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
29656    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29657    pub charging_maximum_voltage: u16,
29658    #[doc = "Number of battery cells in series. 0: field not provided."]
29659    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29660    pub cells_in_series: u8,
29661    #[doc = "Maximum pack discharge current. 0: field not provided."]
29662    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29663    pub discharge_maximum_current: u32,
29664    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
29665    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29666    pub discharge_maximum_burst_current: u32,
29667    #[doc = "Manufacture date (DD/MM/YYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
29668    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29669    #[cfg_attr(feature = "ts", ts(type = "string"))]
29670    pub manufacture_date: CharArray<11>,
29671}
29672impl SMART_BATTERY_INFO_DATA {
29673    pub const ENCODED_LEN: usize = 109usize;
29674    pub const DEFAULT: Self = Self {
29675        capacity_full_specification: 0_i32,
29676        capacity_full: 0_i32,
29677        cycle_count: 0_u16,
29678        weight: 0_u16,
29679        discharge_minimum_voltage: 0_u16,
29680        charging_minimum_voltage: 0_u16,
29681        resting_minimum_voltage: 0_u16,
29682        id: 0_u8,
29683        battery_function: MavBatteryFunction::DEFAULT,
29684        mavtype: MavBatteryType::DEFAULT,
29685        serial_number: CharArray::new([0_u8; 16usize]),
29686        device_name: CharArray::new([0_u8; 50usize]),
29687        charging_maximum_voltage: 0_u16,
29688        cells_in_series: 0_u8,
29689        discharge_maximum_current: 0_u32,
29690        discharge_maximum_burst_current: 0_u32,
29691        manufacture_date: CharArray::new([0_u8; 11usize]),
29692    };
29693    #[cfg(feature = "arbitrary")]
29694    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29695        use arbitrary::{Arbitrary, Unstructured};
29696        let mut buf = [0u8; 1024];
29697        rng.fill_bytes(&mut buf);
29698        let mut unstructured = Unstructured::new(&buf);
29699        Self::arbitrary(&mut unstructured).unwrap_or_default()
29700    }
29701}
29702impl Default for SMART_BATTERY_INFO_DATA {
29703    fn default() -> Self {
29704        Self::DEFAULT.clone()
29705    }
29706}
29707impl MessageData for SMART_BATTERY_INFO_DATA {
29708    type Message = MavMessage;
29709    const ID: u32 = 370u32;
29710    const NAME: &'static str = "SMART_BATTERY_INFO";
29711    const EXTRA_CRC: u8 = 75u8;
29712    const ENCODED_LEN: usize = 109usize;
29713    fn deser(
29714        _version: MavlinkVersion,
29715        __input: &[u8],
29716    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29717        let avail_len = __input.len();
29718        let mut payload_buf = [0; Self::ENCODED_LEN];
29719        let mut buf = if avail_len < Self::ENCODED_LEN {
29720            payload_buf[0..avail_len].copy_from_slice(__input);
29721            Bytes::new(&payload_buf)
29722        } else {
29723            Bytes::new(__input)
29724        };
29725        let mut __struct = Self::default();
29726        __struct.capacity_full_specification = buf.get_i32_le()?;
29727        __struct.capacity_full = buf.get_i32_le()?;
29728        __struct.cycle_count = buf.get_u16_le()?;
29729        __struct.weight = buf.get_u16_le()?;
29730        __struct.discharge_minimum_voltage = buf.get_u16_le()?;
29731        __struct.charging_minimum_voltage = buf.get_u16_le()?;
29732        __struct.resting_minimum_voltage = buf.get_u16_le()?;
29733        __struct.id = buf.get_u8()?;
29734        let tmp = buf.get_u8()?;
29735        __struct.battery_function =
29736            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29737                enum_type: "MavBatteryFunction",
29738                value: tmp as u64,
29739            })?;
29740        let tmp = buf.get_u8()?;
29741        __struct.mavtype =
29742            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29743                enum_type: "MavBatteryType",
29744                value: tmp as u64,
29745            })?;
29746        let mut tmp = [0_u8; 16usize];
29747        for v in &mut tmp {
29748            *v = buf.get_u8()?;
29749        }
29750        __struct.serial_number = CharArray::new(tmp);
29751        let mut tmp = [0_u8; 50usize];
29752        for v in &mut tmp {
29753            *v = buf.get_u8()?;
29754        }
29755        __struct.device_name = CharArray::new(tmp);
29756        __struct.charging_maximum_voltage = buf.get_u16_le()?;
29757        __struct.cells_in_series = buf.get_u8()?;
29758        __struct.discharge_maximum_current = buf.get_u32_le()?;
29759        __struct.discharge_maximum_burst_current = buf.get_u32_le()?;
29760        let mut tmp = [0_u8; 11usize];
29761        for v in &mut tmp {
29762            *v = buf.get_u8()?;
29763        }
29764        __struct.manufacture_date = CharArray::new(tmp);
29765        Ok(__struct)
29766    }
29767    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29768        let mut __tmp = BytesMut::new(bytes);
29769        #[allow(clippy::absurd_extreme_comparisons)]
29770        #[allow(unused_comparisons)]
29771        if __tmp.remaining() < Self::ENCODED_LEN {
29772            panic!(
29773                "buffer is too small (need {} bytes, but got {})",
29774                Self::ENCODED_LEN,
29775                __tmp.remaining(),
29776            )
29777        }
29778        __tmp.put_i32_le(self.capacity_full_specification);
29779        __tmp.put_i32_le(self.capacity_full);
29780        __tmp.put_u16_le(self.cycle_count);
29781        __tmp.put_u16_le(self.weight);
29782        __tmp.put_u16_le(self.discharge_minimum_voltage);
29783        __tmp.put_u16_le(self.charging_minimum_voltage);
29784        __tmp.put_u16_le(self.resting_minimum_voltage);
29785        __tmp.put_u8(self.id);
29786        __tmp.put_u8(self.battery_function as u8);
29787        __tmp.put_u8(self.mavtype as u8);
29788        for val in &self.serial_number {
29789            __tmp.put_u8(*val);
29790        }
29791        for val in &self.device_name {
29792            __tmp.put_u8(*val);
29793        }
29794        if matches!(version, MavlinkVersion::V2) {
29795            __tmp.put_u16_le(self.charging_maximum_voltage);
29796            __tmp.put_u8(self.cells_in_series);
29797            __tmp.put_u32_le(self.discharge_maximum_current);
29798            __tmp.put_u32_le(self.discharge_maximum_burst_current);
29799            for val in &self.manufacture_date {
29800                __tmp.put_u8(*val);
29801            }
29802            let len = __tmp.len();
29803            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29804        } else {
29805            __tmp.len()
29806        }
29807    }
29808}
29809#[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
29810#[doc = ""]
29811#[doc = "ID: 253"]
29812#[derive(Debug, Clone, PartialEq)]
29813#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29814#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29815#[cfg_attr(feature = "ts", derive(TS))]
29816#[cfg_attr(feature = "ts", ts(export))]
29817pub struct STATUSTEXT_DATA {
29818    #[doc = "Severity of status. Relies on the definitions within RFC-5424."]
29819    pub severity: MavSeverity,
29820    #[doc = "Status text message, without null termination character"]
29821    #[cfg_attr(feature = "ts", ts(type = "string"))]
29822    pub text: CharArray<50>,
29823    #[doc = "Unique (opaque) identifier for this statustext message.  May be used to reassemble a logical long-statustext message from a sequence of chunks.  A value of zero indicates this is the only chunk in the sequence and the message can be emitted immediately."]
29824    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29825    pub id: u16,
29826    #[doc = "This chunk's sequence number; indexing is from zero.  Any null character in the text field is taken to mean this was the last chunk."]
29827    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29828    pub chunk_seq: u8,
29829}
29830impl STATUSTEXT_DATA {
29831    pub const ENCODED_LEN: usize = 54usize;
29832    pub const DEFAULT: Self = Self {
29833        severity: MavSeverity::DEFAULT,
29834        text: CharArray::new([0_u8; 50usize]),
29835        id: 0_u16,
29836        chunk_seq: 0_u8,
29837    };
29838    #[cfg(feature = "arbitrary")]
29839    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29840        use arbitrary::{Arbitrary, Unstructured};
29841        let mut buf = [0u8; 1024];
29842        rng.fill_bytes(&mut buf);
29843        let mut unstructured = Unstructured::new(&buf);
29844        Self::arbitrary(&mut unstructured).unwrap_or_default()
29845    }
29846}
29847impl Default for STATUSTEXT_DATA {
29848    fn default() -> Self {
29849        Self::DEFAULT.clone()
29850    }
29851}
29852impl MessageData for STATUSTEXT_DATA {
29853    type Message = MavMessage;
29854    const ID: u32 = 253u32;
29855    const NAME: &'static str = "STATUSTEXT";
29856    const EXTRA_CRC: u8 = 83u8;
29857    const ENCODED_LEN: usize = 54usize;
29858    fn deser(
29859        _version: MavlinkVersion,
29860        __input: &[u8],
29861    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29862        let avail_len = __input.len();
29863        let mut payload_buf = [0; Self::ENCODED_LEN];
29864        let mut buf = if avail_len < Self::ENCODED_LEN {
29865            payload_buf[0..avail_len].copy_from_slice(__input);
29866            Bytes::new(&payload_buf)
29867        } else {
29868            Bytes::new(__input)
29869        };
29870        let mut __struct = Self::default();
29871        let tmp = buf.get_u8()?;
29872        __struct.severity =
29873            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29874                enum_type: "MavSeverity",
29875                value: tmp as u64,
29876            })?;
29877        let mut tmp = [0_u8; 50usize];
29878        for v in &mut tmp {
29879            *v = buf.get_u8()?;
29880        }
29881        __struct.text = CharArray::new(tmp);
29882        __struct.id = buf.get_u16_le()?;
29883        __struct.chunk_seq = buf.get_u8()?;
29884        Ok(__struct)
29885    }
29886    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29887        let mut __tmp = BytesMut::new(bytes);
29888        #[allow(clippy::absurd_extreme_comparisons)]
29889        #[allow(unused_comparisons)]
29890        if __tmp.remaining() < Self::ENCODED_LEN {
29891            panic!(
29892                "buffer is too small (need {} bytes, but got {})",
29893                Self::ENCODED_LEN,
29894                __tmp.remaining(),
29895            )
29896        }
29897        __tmp.put_u8(self.severity as u8);
29898        for val in &self.text {
29899            __tmp.put_u8(*val);
29900        }
29901        if matches!(version, MavlinkVersion::V2) {
29902            __tmp.put_u16_le(self.id);
29903            __tmp.put_u8(self.chunk_seq);
29904            let len = __tmp.len();
29905            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29906        } else {
29907            __tmp.len()
29908        }
29909    }
29910}
29911#[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
29912#[doc = ""]
29913#[doc = "ID: 261"]
29914#[derive(Debug, Clone, PartialEq)]
29915#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29916#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29917#[cfg_attr(feature = "ts", derive(TS))]
29918#[cfg_attr(feature = "ts", ts(export))]
29919pub struct STORAGE_INFORMATION_DATA {
29920    #[doc = "Timestamp (time since system boot)."]
29921    pub time_boot_ms: u32,
29922    #[doc = "Total capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
29923    pub total_capacity: f32,
29924    #[doc = "Used capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
29925    pub used_capacity: f32,
29926    #[doc = "Available storage capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
29927    pub available_capacity: f32,
29928    #[doc = "Read speed."]
29929    pub read_speed: f32,
29930    #[doc = "Write speed."]
29931    pub write_speed: f32,
29932    #[doc = "Storage ID (1 for first, 2 for second, etc.)"]
29933    pub storage_id: u8,
29934    #[doc = "Number of storage devices"]
29935    pub storage_count: u8,
29936    #[doc = "Status of storage"]
29937    pub status: StorageStatus,
29938    #[doc = "Type of storage"]
29939    #[cfg_attr(feature = "serde", serde(default))]
29940    pub mavtype: StorageType,
29941    #[doc = "Textual storage name to be used in UI (microSD 1, Internal Memory, etc.) This is a NULL terminated string. If it is exactly 32 characters long, add a terminating NULL. If this string is empty, the generic type is shown to the user."]
29942    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29943    #[cfg_attr(feature = "ts", ts(type = "string"))]
29944    pub name: CharArray<32>,
29945    #[doc = "Flags indicating whether this instance is preferred storage for photos, videos, etc.         Note: Implementations should initially set the flags on the system-default storage id used for saving media (if possible/supported).         This setting can then be overridden using MAV_CMD_SET_STORAGE_USAGE.         If the media usage flags are not set, a GCS may assume storage ID 1 is the default storage for all media types."]
29946    #[cfg_attr(feature = "serde", serde(default))]
29947    pub storage_usage: StorageUsageFlag,
29948}
29949impl STORAGE_INFORMATION_DATA {
29950    pub const ENCODED_LEN: usize = 61usize;
29951    pub const DEFAULT: Self = Self {
29952        time_boot_ms: 0_u32,
29953        total_capacity: 0.0_f32,
29954        used_capacity: 0.0_f32,
29955        available_capacity: 0.0_f32,
29956        read_speed: 0.0_f32,
29957        write_speed: 0.0_f32,
29958        storage_id: 0_u8,
29959        storage_count: 0_u8,
29960        status: StorageStatus::DEFAULT,
29961        mavtype: StorageType::DEFAULT,
29962        name: CharArray::new([0_u8; 32usize]),
29963        storage_usage: StorageUsageFlag::DEFAULT,
29964    };
29965    #[cfg(feature = "arbitrary")]
29966    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29967        use arbitrary::{Arbitrary, Unstructured};
29968        let mut buf = [0u8; 1024];
29969        rng.fill_bytes(&mut buf);
29970        let mut unstructured = Unstructured::new(&buf);
29971        Self::arbitrary(&mut unstructured).unwrap_or_default()
29972    }
29973}
29974impl Default for STORAGE_INFORMATION_DATA {
29975    fn default() -> Self {
29976        Self::DEFAULT.clone()
29977    }
29978}
29979impl MessageData for STORAGE_INFORMATION_DATA {
29980    type Message = MavMessage;
29981    const ID: u32 = 261u32;
29982    const NAME: &'static str = "STORAGE_INFORMATION";
29983    const EXTRA_CRC: u8 = 179u8;
29984    const ENCODED_LEN: usize = 61usize;
29985    fn deser(
29986        _version: MavlinkVersion,
29987        __input: &[u8],
29988    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29989        let avail_len = __input.len();
29990        let mut payload_buf = [0; Self::ENCODED_LEN];
29991        let mut buf = if avail_len < Self::ENCODED_LEN {
29992            payload_buf[0..avail_len].copy_from_slice(__input);
29993            Bytes::new(&payload_buf)
29994        } else {
29995            Bytes::new(__input)
29996        };
29997        let mut __struct = Self::default();
29998        __struct.time_boot_ms = buf.get_u32_le()?;
29999        __struct.total_capacity = buf.get_f32_le()?;
30000        __struct.used_capacity = buf.get_f32_le()?;
30001        __struct.available_capacity = buf.get_f32_le()?;
30002        __struct.read_speed = buf.get_f32_le()?;
30003        __struct.write_speed = buf.get_f32_le()?;
30004        __struct.storage_id = buf.get_u8()?;
30005        __struct.storage_count = buf.get_u8()?;
30006        let tmp = buf.get_u8()?;
30007        __struct.status =
30008            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30009                enum_type: "StorageStatus",
30010                value: tmp as u64,
30011            })?;
30012        let tmp = buf.get_u8()?;
30013        __struct.mavtype =
30014            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30015                enum_type: "StorageType",
30016                value: tmp as u64,
30017            })?;
30018        let mut tmp = [0_u8; 32usize];
30019        for v in &mut tmp {
30020            *v = buf.get_u8()?;
30021        }
30022        __struct.name = CharArray::new(tmp);
30023        let tmp = buf.get_u8()?;
30024        __struct.storage_usage = StorageUsageFlag::from_bits(
30025            tmp as <StorageUsageFlag as Flags>::Bits,
30026        )
30027        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30028            flag_type: "StorageUsageFlag",
30029            value: tmp as u64,
30030        })?;
30031        Ok(__struct)
30032    }
30033    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30034        let mut __tmp = BytesMut::new(bytes);
30035        #[allow(clippy::absurd_extreme_comparisons)]
30036        #[allow(unused_comparisons)]
30037        if __tmp.remaining() < Self::ENCODED_LEN {
30038            panic!(
30039                "buffer is too small (need {} bytes, but got {})",
30040                Self::ENCODED_LEN,
30041                __tmp.remaining(),
30042            )
30043        }
30044        __tmp.put_u32_le(self.time_boot_ms);
30045        __tmp.put_f32_le(self.total_capacity);
30046        __tmp.put_f32_le(self.used_capacity);
30047        __tmp.put_f32_le(self.available_capacity);
30048        __tmp.put_f32_le(self.read_speed);
30049        __tmp.put_f32_le(self.write_speed);
30050        __tmp.put_u8(self.storage_id);
30051        __tmp.put_u8(self.storage_count);
30052        __tmp.put_u8(self.status as u8);
30053        if matches!(version, MavlinkVersion::V2) {
30054            __tmp.put_u8(self.mavtype as u8);
30055            for val in &self.name {
30056                __tmp.put_u8(*val);
30057            }
30058            __tmp.put_u8(self.storage_usage.bits() as u8);
30059            let len = __tmp.len();
30060            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30061        } else {
30062            __tmp.len()
30063        }
30064    }
30065}
30066#[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
30067#[doc = ""]
30068#[doc = "ID: 401"]
30069#[derive(Debug, Clone, PartialEq)]
30070#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30071#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30072#[cfg_attr(feature = "ts", derive(TS))]
30073#[cfg_attr(feature = "ts", ts(export))]
30074pub struct SUPPORTED_TUNES_DATA {
30075    #[doc = "Bitfield of supported tune formats."]
30076    pub format: TuneFormat,
30077    #[doc = "System ID"]
30078    pub target_system: u8,
30079    #[doc = "Component ID"]
30080    pub target_component: u8,
30081}
30082impl SUPPORTED_TUNES_DATA {
30083    pub const ENCODED_LEN: usize = 6usize;
30084    pub const DEFAULT: Self = Self {
30085        format: TuneFormat::DEFAULT,
30086        target_system: 0_u8,
30087        target_component: 0_u8,
30088    };
30089    #[cfg(feature = "arbitrary")]
30090    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30091        use arbitrary::{Arbitrary, Unstructured};
30092        let mut buf = [0u8; 1024];
30093        rng.fill_bytes(&mut buf);
30094        let mut unstructured = Unstructured::new(&buf);
30095        Self::arbitrary(&mut unstructured).unwrap_or_default()
30096    }
30097}
30098impl Default for SUPPORTED_TUNES_DATA {
30099    fn default() -> Self {
30100        Self::DEFAULT.clone()
30101    }
30102}
30103impl MessageData for SUPPORTED_TUNES_DATA {
30104    type Message = MavMessage;
30105    const ID: u32 = 401u32;
30106    const NAME: &'static str = "SUPPORTED_TUNES";
30107    const EXTRA_CRC: u8 = 183u8;
30108    const ENCODED_LEN: usize = 6usize;
30109    fn deser(
30110        _version: MavlinkVersion,
30111        __input: &[u8],
30112    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30113        let avail_len = __input.len();
30114        let mut payload_buf = [0; Self::ENCODED_LEN];
30115        let mut buf = if avail_len < Self::ENCODED_LEN {
30116            payload_buf[0..avail_len].copy_from_slice(__input);
30117            Bytes::new(&payload_buf)
30118        } else {
30119            Bytes::new(__input)
30120        };
30121        let mut __struct = Self::default();
30122        let tmp = buf.get_u32_le()?;
30123        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
30124            ::mavlink_core::error::ParserError::InvalidEnum {
30125                enum_type: "TuneFormat",
30126                value: tmp as u64,
30127            },
30128        )?;
30129        __struct.target_system = buf.get_u8()?;
30130        __struct.target_component = buf.get_u8()?;
30131        Ok(__struct)
30132    }
30133    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30134        let mut __tmp = BytesMut::new(bytes);
30135        #[allow(clippy::absurd_extreme_comparisons)]
30136        #[allow(unused_comparisons)]
30137        if __tmp.remaining() < Self::ENCODED_LEN {
30138            panic!(
30139                "buffer is too small (need {} bytes, but got {})",
30140                Self::ENCODED_LEN,
30141                __tmp.remaining(),
30142            )
30143        }
30144        __tmp.put_u32_le(self.format as u32);
30145        __tmp.put_u8(self.target_system);
30146        __tmp.put_u8(self.target_component);
30147        if matches!(version, MavlinkVersion::V2) {
30148            let len = __tmp.len();
30149            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30150        } else {
30151            __tmp.len()
30152        }
30153    }
30154}
30155#[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
30156#[doc = ""]
30157#[doc = "ID: 2"]
30158#[derive(Debug, Clone, PartialEq)]
30159#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30160#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30161#[cfg_attr(feature = "ts", derive(TS))]
30162#[cfg_attr(feature = "ts", ts(export))]
30163pub struct SYSTEM_TIME_DATA {
30164    #[doc = "Timestamp (UNIX epoch time)."]
30165    pub time_unix_usec: u64,
30166    #[doc = "Timestamp (time since system boot)."]
30167    pub time_boot_ms: u32,
30168}
30169impl SYSTEM_TIME_DATA {
30170    pub const ENCODED_LEN: usize = 12usize;
30171    pub const DEFAULT: Self = Self {
30172        time_unix_usec: 0_u64,
30173        time_boot_ms: 0_u32,
30174    };
30175    #[cfg(feature = "arbitrary")]
30176    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30177        use arbitrary::{Arbitrary, Unstructured};
30178        let mut buf = [0u8; 1024];
30179        rng.fill_bytes(&mut buf);
30180        let mut unstructured = Unstructured::new(&buf);
30181        Self::arbitrary(&mut unstructured).unwrap_or_default()
30182    }
30183}
30184impl Default for SYSTEM_TIME_DATA {
30185    fn default() -> Self {
30186        Self::DEFAULT.clone()
30187    }
30188}
30189impl MessageData for SYSTEM_TIME_DATA {
30190    type Message = MavMessage;
30191    const ID: u32 = 2u32;
30192    const NAME: &'static str = "SYSTEM_TIME";
30193    const EXTRA_CRC: u8 = 137u8;
30194    const ENCODED_LEN: usize = 12usize;
30195    fn deser(
30196        _version: MavlinkVersion,
30197        __input: &[u8],
30198    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30199        let avail_len = __input.len();
30200        let mut payload_buf = [0; Self::ENCODED_LEN];
30201        let mut buf = if avail_len < Self::ENCODED_LEN {
30202            payload_buf[0..avail_len].copy_from_slice(__input);
30203            Bytes::new(&payload_buf)
30204        } else {
30205            Bytes::new(__input)
30206        };
30207        let mut __struct = Self::default();
30208        __struct.time_unix_usec = buf.get_u64_le()?;
30209        __struct.time_boot_ms = buf.get_u32_le()?;
30210        Ok(__struct)
30211    }
30212    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30213        let mut __tmp = BytesMut::new(bytes);
30214        #[allow(clippy::absurd_extreme_comparisons)]
30215        #[allow(unused_comparisons)]
30216        if __tmp.remaining() < Self::ENCODED_LEN {
30217            panic!(
30218                "buffer is too small (need {} bytes, but got {})",
30219                Self::ENCODED_LEN,
30220                __tmp.remaining(),
30221            )
30222        }
30223        __tmp.put_u64_le(self.time_unix_usec);
30224        __tmp.put_u32_le(self.time_boot_ms);
30225        if matches!(version, MavlinkVersion::V2) {
30226            let len = __tmp.len();
30227            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30228        } else {
30229            __tmp.len()
30230        }
30231    }
30232}
30233#[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
30234#[doc = ""]
30235#[doc = "ID: 1"]
30236#[derive(Debug, Clone, PartialEq)]
30237#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30238#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30239#[cfg_attr(feature = "ts", derive(TS))]
30240#[cfg_attr(feature = "ts", ts(export))]
30241pub struct SYS_STATUS_DATA {
30242    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
30243    pub onboard_control_sensors_present: MavSysStatusSensor,
30244    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
30245    pub onboard_control_sensors_enabled: MavSysStatusSensor,
30246    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
30247    pub onboard_control_sensors_health: MavSysStatusSensor,
30248    #[doc = "Maximum usage in percent of the mainloop time. Values: [0-1000] - should always be below 1000"]
30249    pub load: u16,
30250    #[doc = "Battery voltage, UINT16_MAX: Voltage not sent by autopilot"]
30251    pub voltage_battery: u16,
30252    #[doc = "Battery current, -1: Current not sent by autopilot"]
30253    pub current_battery: i16,
30254    #[doc = "Communication drop rate, (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
30255    pub drop_rate_comm: u16,
30256    #[doc = "Communication errors (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
30257    pub errors_comm: u16,
30258    #[doc = "Autopilot-specific errors"]
30259    pub errors_count1: u16,
30260    #[doc = "Autopilot-specific errors"]
30261    pub errors_count2: u16,
30262    #[doc = "Autopilot-specific errors"]
30263    pub errors_count3: u16,
30264    #[doc = "Autopilot-specific errors"]
30265    pub errors_count4: u16,
30266    #[doc = "Battery energy remaining, -1: Battery remaining energy not sent by autopilot"]
30267    pub battery_remaining: i8,
30268    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
30269    #[cfg_attr(feature = "serde", serde(default))]
30270    pub onboard_control_sensors_present_extended: MavSysStatusSensorExtended,
30271    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
30272    #[cfg_attr(feature = "serde", serde(default))]
30273    pub onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended,
30274    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
30275    #[cfg_attr(feature = "serde", serde(default))]
30276    pub onboard_control_sensors_health_extended: MavSysStatusSensorExtended,
30277}
30278impl SYS_STATUS_DATA {
30279    pub const ENCODED_LEN: usize = 43usize;
30280    pub const DEFAULT: Self = Self {
30281        onboard_control_sensors_present: MavSysStatusSensor::DEFAULT,
30282        onboard_control_sensors_enabled: MavSysStatusSensor::DEFAULT,
30283        onboard_control_sensors_health: MavSysStatusSensor::DEFAULT,
30284        load: 0_u16,
30285        voltage_battery: 0_u16,
30286        current_battery: 0_i16,
30287        drop_rate_comm: 0_u16,
30288        errors_comm: 0_u16,
30289        errors_count1: 0_u16,
30290        errors_count2: 0_u16,
30291        errors_count3: 0_u16,
30292        errors_count4: 0_u16,
30293        battery_remaining: 0_i8,
30294        onboard_control_sensors_present_extended: MavSysStatusSensorExtended::DEFAULT,
30295        onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended::DEFAULT,
30296        onboard_control_sensors_health_extended: MavSysStatusSensorExtended::DEFAULT,
30297    };
30298    #[cfg(feature = "arbitrary")]
30299    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30300        use arbitrary::{Arbitrary, Unstructured};
30301        let mut buf = [0u8; 1024];
30302        rng.fill_bytes(&mut buf);
30303        let mut unstructured = Unstructured::new(&buf);
30304        Self::arbitrary(&mut unstructured).unwrap_or_default()
30305    }
30306}
30307impl Default for SYS_STATUS_DATA {
30308    fn default() -> Self {
30309        Self::DEFAULT.clone()
30310    }
30311}
30312impl MessageData for SYS_STATUS_DATA {
30313    type Message = MavMessage;
30314    const ID: u32 = 1u32;
30315    const NAME: &'static str = "SYS_STATUS";
30316    const EXTRA_CRC: u8 = 124u8;
30317    const ENCODED_LEN: usize = 43usize;
30318    fn deser(
30319        _version: MavlinkVersion,
30320        __input: &[u8],
30321    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30322        let avail_len = __input.len();
30323        let mut payload_buf = [0; Self::ENCODED_LEN];
30324        let mut buf = if avail_len < Self::ENCODED_LEN {
30325            payload_buf[0..avail_len].copy_from_slice(__input);
30326            Bytes::new(&payload_buf)
30327        } else {
30328            Bytes::new(__input)
30329        };
30330        let mut __struct = Self::default();
30331        let tmp = buf.get_u32_le()?;
30332        __struct.onboard_control_sensors_present = MavSysStatusSensor::from_bits(
30333            tmp as <MavSysStatusSensor as Flags>::Bits,
30334        )
30335        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30336            flag_type: "MavSysStatusSensor",
30337            value: tmp as u64,
30338        })?;
30339        let tmp = buf.get_u32_le()?;
30340        __struct.onboard_control_sensors_enabled = MavSysStatusSensor::from_bits(
30341            tmp as <MavSysStatusSensor as Flags>::Bits,
30342        )
30343        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30344            flag_type: "MavSysStatusSensor",
30345            value: tmp as u64,
30346        })?;
30347        let tmp = buf.get_u32_le()?;
30348        __struct.onboard_control_sensors_health = MavSysStatusSensor::from_bits(
30349            tmp as <MavSysStatusSensor as Flags>::Bits,
30350        )
30351        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30352            flag_type: "MavSysStatusSensor",
30353            value: tmp as u64,
30354        })?;
30355        __struct.load = buf.get_u16_le()?;
30356        __struct.voltage_battery = buf.get_u16_le()?;
30357        __struct.current_battery = buf.get_i16_le()?;
30358        __struct.drop_rate_comm = buf.get_u16_le()?;
30359        __struct.errors_comm = buf.get_u16_le()?;
30360        __struct.errors_count1 = buf.get_u16_le()?;
30361        __struct.errors_count2 = buf.get_u16_le()?;
30362        __struct.errors_count3 = buf.get_u16_le()?;
30363        __struct.errors_count4 = buf.get_u16_le()?;
30364        __struct.battery_remaining = buf.get_i8()?;
30365        let tmp = buf.get_u32_le()?;
30366        __struct.onboard_control_sensors_present_extended = MavSysStatusSensorExtended::from_bits(
30367            tmp as <MavSysStatusSensorExtended as Flags>::Bits,
30368        )
30369        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30370            flag_type: "MavSysStatusSensorExtended",
30371            value: tmp as u64,
30372        })?;
30373        let tmp = buf.get_u32_le()?;
30374        __struct.onboard_control_sensors_enabled_extended = MavSysStatusSensorExtended::from_bits(
30375            tmp as <MavSysStatusSensorExtended as Flags>::Bits,
30376        )
30377        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30378            flag_type: "MavSysStatusSensorExtended",
30379            value: tmp as u64,
30380        })?;
30381        let tmp = buf.get_u32_le()?;
30382        __struct.onboard_control_sensors_health_extended = MavSysStatusSensorExtended::from_bits(
30383            tmp as <MavSysStatusSensorExtended as Flags>::Bits,
30384        )
30385        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30386            flag_type: "MavSysStatusSensorExtended",
30387            value: tmp as u64,
30388        })?;
30389        Ok(__struct)
30390    }
30391    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30392        let mut __tmp = BytesMut::new(bytes);
30393        #[allow(clippy::absurd_extreme_comparisons)]
30394        #[allow(unused_comparisons)]
30395        if __tmp.remaining() < Self::ENCODED_LEN {
30396            panic!(
30397                "buffer is too small (need {} bytes, but got {})",
30398                Self::ENCODED_LEN,
30399                __tmp.remaining(),
30400            )
30401        }
30402        __tmp.put_u32_le(self.onboard_control_sensors_present.bits() as u32);
30403        __tmp.put_u32_le(self.onboard_control_sensors_enabled.bits() as u32);
30404        __tmp.put_u32_le(self.onboard_control_sensors_health.bits() as u32);
30405        __tmp.put_u16_le(self.load);
30406        __tmp.put_u16_le(self.voltage_battery);
30407        __tmp.put_i16_le(self.current_battery);
30408        __tmp.put_u16_le(self.drop_rate_comm);
30409        __tmp.put_u16_le(self.errors_comm);
30410        __tmp.put_u16_le(self.errors_count1);
30411        __tmp.put_u16_le(self.errors_count2);
30412        __tmp.put_u16_le(self.errors_count3);
30413        __tmp.put_u16_le(self.errors_count4);
30414        __tmp.put_i8(self.battery_remaining);
30415        if matches!(version, MavlinkVersion::V2) {
30416            __tmp.put_u32_le(self.onboard_control_sensors_present_extended.bits() as u32);
30417            __tmp.put_u32_le(self.onboard_control_sensors_enabled_extended.bits() as u32);
30418            __tmp.put_u32_le(self.onboard_control_sensors_health_extended.bits() as u32);
30419            let len = __tmp.len();
30420            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30421        } else {
30422            __tmp.len()
30423        }
30424    }
30425}
30426#[doc = "Current motion information from sensors on a target."]
30427#[doc = ""]
30428#[doc = "ID: 510"]
30429#[derive(Debug, Clone, PartialEq)]
30430#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30431#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30432#[cfg_attr(feature = "ts", derive(TS))]
30433#[cfg_attr(feature = "ts", ts(export))]
30434pub struct TARGET_ABSOLUTE_DATA {
30435    #[doc = "Timestamp (UNIX epoch time)."]
30436    pub timestamp: u64,
30437    #[doc = "Target's latitude (WGS84)"]
30438    pub lat: i32,
30439    #[doc = "Target's longitude (WGS84)"]
30440    pub lon: i32,
30441    #[doc = "Target's altitude (AMSL)"]
30442    pub alt: f32,
30443    #[doc = "Target's velocity in its body frame"]
30444    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30445    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30446    pub vel: [f32; 3],
30447    #[doc = "Linear target's acceleration in its body frame"]
30448    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30449    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30450    pub acc: [f32; 3],
30451    #[doc = "Quaternion of the target's orientation from its body frame to the vehicle's NED frame."]
30452    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30453    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30454    pub q_target: [f32; 4],
30455    #[doc = "Target's roll, pitch and yaw rates"]
30456    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30457    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30458    pub rates: [f32; 3],
30459    #[doc = "Standard deviation of horizontal (eph) and vertical (epv) position errors"]
30460    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30461    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30462    pub position_std: [f32; 2],
30463    #[doc = "Standard deviation of the target's velocity in its body frame"]
30464    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30465    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30466    pub vel_std: [f32; 3],
30467    #[doc = "Standard deviation of the target's acceleration in its body frame"]
30468    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30469    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30470    pub acc_std: [f32; 3],
30471    #[doc = "The ID of the target if multiple targets are present"]
30472    pub id: u8,
30473    #[doc = "Bitmap to indicate the sensor's reporting capabilities"]
30474    pub sensor_capabilities: TargetAbsoluteSensorCapabilityFlags,
30475}
30476impl TARGET_ABSOLUTE_DATA {
30477    pub const ENCODED_LEN: usize = 106usize;
30478    pub const DEFAULT: Self = Self {
30479        timestamp: 0_u64,
30480        lat: 0_i32,
30481        lon: 0_i32,
30482        alt: 0.0_f32,
30483        vel: [0.0_f32; 3usize],
30484        acc: [0.0_f32; 3usize],
30485        q_target: [0.0_f32; 4usize],
30486        rates: [0.0_f32; 3usize],
30487        position_std: [0.0_f32; 2usize],
30488        vel_std: [0.0_f32; 3usize],
30489        acc_std: [0.0_f32; 3usize],
30490        id: 0_u8,
30491        sensor_capabilities: TargetAbsoluteSensorCapabilityFlags::DEFAULT,
30492    };
30493    #[cfg(feature = "arbitrary")]
30494    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30495        use arbitrary::{Arbitrary, Unstructured};
30496        let mut buf = [0u8; 1024];
30497        rng.fill_bytes(&mut buf);
30498        let mut unstructured = Unstructured::new(&buf);
30499        Self::arbitrary(&mut unstructured).unwrap_or_default()
30500    }
30501}
30502impl Default for TARGET_ABSOLUTE_DATA {
30503    fn default() -> Self {
30504        Self::DEFAULT.clone()
30505    }
30506}
30507impl MessageData for TARGET_ABSOLUTE_DATA {
30508    type Message = MavMessage;
30509    const ID: u32 = 510u32;
30510    const NAME: &'static str = "TARGET_ABSOLUTE";
30511    const EXTRA_CRC: u8 = 245u8;
30512    const ENCODED_LEN: usize = 106usize;
30513    fn deser(
30514        _version: MavlinkVersion,
30515        __input: &[u8],
30516    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30517        let avail_len = __input.len();
30518        let mut payload_buf = [0; Self::ENCODED_LEN];
30519        let mut buf = if avail_len < Self::ENCODED_LEN {
30520            payload_buf[0..avail_len].copy_from_slice(__input);
30521            Bytes::new(&payload_buf)
30522        } else {
30523            Bytes::new(__input)
30524        };
30525        let mut __struct = Self::default();
30526        __struct.timestamp = buf.get_u64_le()?;
30527        __struct.lat = buf.get_i32_le()?;
30528        __struct.lon = buf.get_i32_le()?;
30529        __struct.alt = buf.get_f32_le()?;
30530        for v in &mut __struct.vel {
30531            let val = buf.get_f32_le()?;
30532            *v = val;
30533        }
30534        for v in &mut __struct.acc {
30535            let val = buf.get_f32_le()?;
30536            *v = val;
30537        }
30538        for v in &mut __struct.q_target {
30539            let val = buf.get_f32_le()?;
30540            *v = val;
30541        }
30542        for v in &mut __struct.rates {
30543            let val = buf.get_f32_le()?;
30544            *v = val;
30545        }
30546        for v in &mut __struct.position_std {
30547            let val = buf.get_f32_le()?;
30548            *v = val;
30549        }
30550        for v in &mut __struct.vel_std {
30551            let val = buf.get_f32_le()?;
30552            *v = val;
30553        }
30554        for v in &mut __struct.acc_std {
30555            let val = buf.get_f32_le()?;
30556            *v = val;
30557        }
30558        __struct.id = buf.get_u8()?;
30559        let tmp = buf.get_u8()?;
30560        __struct.sensor_capabilities = TargetAbsoluteSensorCapabilityFlags::from_bits(
30561            tmp as <TargetAbsoluteSensorCapabilityFlags as Flags>::Bits,
30562        )
30563        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30564            flag_type: "TargetAbsoluteSensorCapabilityFlags",
30565            value: tmp as u64,
30566        })?;
30567        Ok(__struct)
30568    }
30569    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30570        let mut __tmp = BytesMut::new(bytes);
30571        #[allow(clippy::absurd_extreme_comparisons)]
30572        #[allow(unused_comparisons)]
30573        if __tmp.remaining() < Self::ENCODED_LEN {
30574            panic!(
30575                "buffer is too small (need {} bytes, but got {})",
30576                Self::ENCODED_LEN,
30577                __tmp.remaining(),
30578            )
30579        }
30580        __tmp.put_u64_le(self.timestamp);
30581        __tmp.put_i32_le(self.lat);
30582        __tmp.put_i32_le(self.lon);
30583        __tmp.put_f32_le(self.alt);
30584        for val in &self.vel {
30585            __tmp.put_f32_le(*val);
30586        }
30587        for val in &self.acc {
30588            __tmp.put_f32_le(*val);
30589        }
30590        for val in &self.q_target {
30591            __tmp.put_f32_le(*val);
30592        }
30593        for val in &self.rates {
30594            __tmp.put_f32_le(*val);
30595        }
30596        for val in &self.position_std {
30597            __tmp.put_f32_le(*val);
30598        }
30599        for val in &self.vel_std {
30600            __tmp.put_f32_le(*val);
30601        }
30602        for val in &self.acc_std {
30603            __tmp.put_f32_le(*val);
30604        }
30605        __tmp.put_u8(self.id);
30606        __tmp.put_u8(self.sensor_capabilities.bits() as u8);
30607        if matches!(version, MavlinkVersion::V2) {
30608            let len = __tmp.len();
30609            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30610        } else {
30611            __tmp.len()
30612        }
30613    }
30614}
30615#[doc = "The location of a target measured by MAV's onboard sensors."]
30616#[doc = ""]
30617#[doc = "ID: 511"]
30618#[derive(Debug, Clone, PartialEq)]
30619#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30620#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30621#[cfg_attr(feature = "ts", derive(TS))]
30622#[cfg_attr(feature = "ts", ts(export))]
30623pub struct TARGET_RELATIVE_DATA {
30624    #[doc = "Timestamp (UNIX epoch time)"]
30625    pub timestamp: u64,
30626    #[doc = "X Position of the target in TARGET_OBS_FRAME"]
30627    pub x: f32,
30628    #[doc = "Y Position of the target in TARGET_OBS_FRAME"]
30629    pub y: f32,
30630    #[doc = "Z Position of the target in TARGET_OBS_FRAME"]
30631    pub z: f32,
30632    #[doc = "Standard deviation of the target's position in TARGET_OBS_FRAME"]
30633    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30634    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30635    pub pos_std: [f32; 3],
30636    #[doc = "Standard deviation of the target's orientation in TARGET_OBS_FRAME"]
30637    pub yaw_std: f32,
30638    #[doc = "Quaternion of the target's orientation from the target's frame to the TARGET_OBS_FRAME (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
30639    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30640    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30641    pub q_target: [f32; 4],
30642    #[doc = "Quaternion of the sensor's orientation from TARGET_OBS_FRAME to vehicle-carried NED. (Ignored if set to (0,0,0,0)) (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
30643    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30644    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30645    pub q_sensor: [f32; 4],
30646    #[doc = "The ID of the target if multiple targets are present"]
30647    pub id: u8,
30648    #[doc = "Coordinate frame used for following fields."]
30649    pub frame: TargetObsFrame,
30650    #[doc = "Type of target"]
30651    pub mavtype: LandingTargetType,
30652}
30653impl TARGET_RELATIVE_DATA {
30654    pub const ENCODED_LEN: usize = 71usize;
30655    pub const DEFAULT: Self = Self {
30656        timestamp: 0_u64,
30657        x: 0.0_f32,
30658        y: 0.0_f32,
30659        z: 0.0_f32,
30660        pos_std: [0.0_f32; 3usize],
30661        yaw_std: 0.0_f32,
30662        q_target: [0.0_f32; 4usize],
30663        q_sensor: [0.0_f32; 4usize],
30664        id: 0_u8,
30665        frame: TargetObsFrame::DEFAULT,
30666        mavtype: LandingTargetType::DEFAULT,
30667    };
30668    #[cfg(feature = "arbitrary")]
30669    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30670        use arbitrary::{Arbitrary, Unstructured};
30671        let mut buf = [0u8; 1024];
30672        rng.fill_bytes(&mut buf);
30673        let mut unstructured = Unstructured::new(&buf);
30674        Self::arbitrary(&mut unstructured).unwrap_or_default()
30675    }
30676}
30677impl Default for TARGET_RELATIVE_DATA {
30678    fn default() -> Self {
30679        Self::DEFAULT.clone()
30680    }
30681}
30682impl MessageData for TARGET_RELATIVE_DATA {
30683    type Message = MavMessage;
30684    const ID: u32 = 511u32;
30685    const NAME: &'static str = "TARGET_RELATIVE";
30686    const EXTRA_CRC: u8 = 28u8;
30687    const ENCODED_LEN: usize = 71usize;
30688    fn deser(
30689        _version: MavlinkVersion,
30690        __input: &[u8],
30691    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30692        let avail_len = __input.len();
30693        let mut payload_buf = [0; Self::ENCODED_LEN];
30694        let mut buf = if avail_len < Self::ENCODED_LEN {
30695            payload_buf[0..avail_len].copy_from_slice(__input);
30696            Bytes::new(&payload_buf)
30697        } else {
30698            Bytes::new(__input)
30699        };
30700        let mut __struct = Self::default();
30701        __struct.timestamp = buf.get_u64_le()?;
30702        __struct.x = buf.get_f32_le()?;
30703        __struct.y = buf.get_f32_le()?;
30704        __struct.z = buf.get_f32_le()?;
30705        for v in &mut __struct.pos_std {
30706            let val = buf.get_f32_le()?;
30707            *v = val;
30708        }
30709        __struct.yaw_std = buf.get_f32_le()?;
30710        for v in &mut __struct.q_target {
30711            let val = buf.get_f32_le()?;
30712            *v = val;
30713        }
30714        for v in &mut __struct.q_sensor {
30715            let val = buf.get_f32_le()?;
30716            *v = val;
30717        }
30718        __struct.id = buf.get_u8()?;
30719        let tmp = buf.get_u8()?;
30720        __struct.frame =
30721            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30722                enum_type: "TargetObsFrame",
30723                value: tmp as u64,
30724            })?;
30725        let tmp = buf.get_u8()?;
30726        __struct.mavtype =
30727            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30728                enum_type: "LandingTargetType",
30729                value: tmp as u64,
30730            })?;
30731        Ok(__struct)
30732    }
30733    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30734        let mut __tmp = BytesMut::new(bytes);
30735        #[allow(clippy::absurd_extreme_comparisons)]
30736        #[allow(unused_comparisons)]
30737        if __tmp.remaining() < Self::ENCODED_LEN {
30738            panic!(
30739                "buffer is too small (need {} bytes, but got {})",
30740                Self::ENCODED_LEN,
30741                __tmp.remaining(),
30742            )
30743        }
30744        __tmp.put_u64_le(self.timestamp);
30745        __tmp.put_f32_le(self.x);
30746        __tmp.put_f32_le(self.y);
30747        __tmp.put_f32_le(self.z);
30748        for val in &self.pos_std {
30749            __tmp.put_f32_le(*val);
30750        }
30751        __tmp.put_f32_le(self.yaw_std);
30752        for val in &self.q_target {
30753            __tmp.put_f32_le(*val);
30754        }
30755        for val in &self.q_sensor {
30756            __tmp.put_f32_le(*val);
30757        }
30758        __tmp.put_u8(self.id);
30759        __tmp.put_u8(self.frame as u8);
30760        __tmp.put_u8(self.mavtype as u8);
30761        if matches!(version, MavlinkVersion::V2) {
30762            let len = __tmp.len();
30763            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30764        } else {
30765            __tmp.len()
30766        }
30767    }
30768}
30769#[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
30770#[doc = ""]
30771#[doc = "ID: 135"]
30772#[derive(Debug, Clone, PartialEq)]
30773#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30774#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30775#[cfg_attr(feature = "ts", derive(TS))]
30776#[cfg_attr(feature = "ts", ts(export))]
30777pub struct TERRAIN_CHECK_DATA {
30778    #[doc = "Latitude"]
30779    pub lat: i32,
30780    #[doc = "Longitude"]
30781    pub lon: i32,
30782}
30783impl TERRAIN_CHECK_DATA {
30784    pub const ENCODED_LEN: usize = 8usize;
30785    pub const DEFAULT: Self = Self {
30786        lat: 0_i32,
30787        lon: 0_i32,
30788    };
30789    #[cfg(feature = "arbitrary")]
30790    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30791        use arbitrary::{Arbitrary, Unstructured};
30792        let mut buf = [0u8; 1024];
30793        rng.fill_bytes(&mut buf);
30794        let mut unstructured = Unstructured::new(&buf);
30795        Self::arbitrary(&mut unstructured).unwrap_or_default()
30796    }
30797}
30798impl Default for TERRAIN_CHECK_DATA {
30799    fn default() -> Self {
30800        Self::DEFAULT.clone()
30801    }
30802}
30803impl MessageData for TERRAIN_CHECK_DATA {
30804    type Message = MavMessage;
30805    const ID: u32 = 135u32;
30806    const NAME: &'static str = "TERRAIN_CHECK";
30807    const EXTRA_CRC: u8 = 203u8;
30808    const ENCODED_LEN: usize = 8usize;
30809    fn deser(
30810        _version: MavlinkVersion,
30811        __input: &[u8],
30812    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30813        let avail_len = __input.len();
30814        let mut payload_buf = [0; Self::ENCODED_LEN];
30815        let mut buf = if avail_len < Self::ENCODED_LEN {
30816            payload_buf[0..avail_len].copy_from_slice(__input);
30817            Bytes::new(&payload_buf)
30818        } else {
30819            Bytes::new(__input)
30820        };
30821        let mut __struct = Self::default();
30822        __struct.lat = buf.get_i32_le()?;
30823        __struct.lon = buf.get_i32_le()?;
30824        Ok(__struct)
30825    }
30826    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30827        let mut __tmp = BytesMut::new(bytes);
30828        #[allow(clippy::absurd_extreme_comparisons)]
30829        #[allow(unused_comparisons)]
30830        if __tmp.remaining() < Self::ENCODED_LEN {
30831            panic!(
30832                "buffer is too small (need {} bytes, but got {})",
30833                Self::ENCODED_LEN,
30834                __tmp.remaining(),
30835            )
30836        }
30837        __tmp.put_i32_le(self.lat);
30838        __tmp.put_i32_le(self.lon);
30839        if matches!(version, MavlinkVersion::V2) {
30840            let len = __tmp.len();
30841            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30842        } else {
30843            __tmp.len()
30844        }
30845    }
30846}
30847#[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
30848#[doc = ""]
30849#[doc = "ID: 134"]
30850#[derive(Debug, Clone, PartialEq)]
30851#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30852#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30853#[cfg_attr(feature = "ts", derive(TS))]
30854#[cfg_attr(feature = "ts", ts(export))]
30855pub struct TERRAIN_DATA_DATA {
30856    #[doc = "Latitude of SW corner of first grid"]
30857    pub lat: i32,
30858    #[doc = "Longitude of SW corner of first grid"]
30859    pub lon: i32,
30860    #[doc = "Grid spacing"]
30861    pub grid_spacing: u16,
30862    #[doc = "Terrain data MSL"]
30863    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30864    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
30865    pub data: [i16; 16],
30866    #[doc = "bit within the terrain request mask"]
30867    pub gridbit: u8,
30868}
30869impl TERRAIN_DATA_DATA {
30870    pub const ENCODED_LEN: usize = 43usize;
30871    pub const DEFAULT: Self = Self {
30872        lat: 0_i32,
30873        lon: 0_i32,
30874        grid_spacing: 0_u16,
30875        data: [0_i16; 16usize],
30876        gridbit: 0_u8,
30877    };
30878    #[cfg(feature = "arbitrary")]
30879    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30880        use arbitrary::{Arbitrary, Unstructured};
30881        let mut buf = [0u8; 1024];
30882        rng.fill_bytes(&mut buf);
30883        let mut unstructured = Unstructured::new(&buf);
30884        Self::arbitrary(&mut unstructured).unwrap_or_default()
30885    }
30886}
30887impl Default for TERRAIN_DATA_DATA {
30888    fn default() -> Self {
30889        Self::DEFAULT.clone()
30890    }
30891}
30892impl MessageData for TERRAIN_DATA_DATA {
30893    type Message = MavMessage;
30894    const ID: u32 = 134u32;
30895    const NAME: &'static str = "TERRAIN_DATA";
30896    const EXTRA_CRC: u8 = 229u8;
30897    const ENCODED_LEN: usize = 43usize;
30898    fn deser(
30899        _version: MavlinkVersion,
30900        __input: &[u8],
30901    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30902        let avail_len = __input.len();
30903        let mut payload_buf = [0; Self::ENCODED_LEN];
30904        let mut buf = if avail_len < Self::ENCODED_LEN {
30905            payload_buf[0..avail_len].copy_from_slice(__input);
30906            Bytes::new(&payload_buf)
30907        } else {
30908            Bytes::new(__input)
30909        };
30910        let mut __struct = Self::default();
30911        __struct.lat = buf.get_i32_le()?;
30912        __struct.lon = buf.get_i32_le()?;
30913        __struct.grid_spacing = buf.get_u16_le()?;
30914        for v in &mut __struct.data {
30915            let val = buf.get_i16_le()?;
30916            *v = val;
30917        }
30918        __struct.gridbit = buf.get_u8()?;
30919        Ok(__struct)
30920    }
30921    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30922        let mut __tmp = BytesMut::new(bytes);
30923        #[allow(clippy::absurd_extreme_comparisons)]
30924        #[allow(unused_comparisons)]
30925        if __tmp.remaining() < Self::ENCODED_LEN {
30926            panic!(
30927                "buffer is too small (need {} bytes, but got {})",
30928                Self::ENCODED_LEN,
30929                __tmp.remaining(),
30930            )
30931        }
30932        __tmp.put_i32_le(self.lat);
30933        __tmp.put_i32_le(self.lon);
30934        __tmp.put_u16_le(self.grid_spacing);
30935        for val in &self.data {
30936            __tmp.put_i16_le(*val);
30937        }
30938        __tmp.put_u8(self.gridbit);
30939        if matches!(version, MavlinkVersion::V2) {
30940            let len = __tmp.len();
30941            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30942        } else {
30943            __tmp.len()
30944        }
30945    }
30946}
30947#[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
30948#[doc = ""]
30949#[doc = "ID: 136"]
30950#[derive(Debug, Clone, PartialEq)]
30951#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30952#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30953#[cfg_attr(feature = "ts", derive(TS))]
30954#[cfg_attr(feature = "ts", ts(export))]
30955pub struct TERRAIN_REPORT_DATA {
30956    #[doc = "Latitude"]
30957    pub lat: i32,
30958    #[doc = "Longitude"]
30959    pub lon: i32,
30960    #[doc = "Terrain height MSL"]
30961    pub terrain_height: f32,
30962    #[doc = "Current vehicle height above lat/lon terrain height"]
30963    pub current_height: f32,
30964    #[doc = "grid spacing (zero if terrain at this location unavailable)"]
30965    pub spacing: u16,
30966    #[doc = "Number of 4x4 terrain blocks waiting to be received or read from disk"]
30967    pub pending: u16,
30968    #[doc = "Number of 4x4 terrain blocks in memory"]
30969    pub loaded: u16,
30970}
30971impl TERRAIN_REPORT_DATA {
30972    pub const ENCODED_LEN: usize = 22usize;
30973    pub const DEFAULT: Self = Self {
30974        lat: 0_i32,
30975        lon: 0_i32,
30976        terrain_height: 0.0_f32,
30977        current_height: 0.0_f32,
30978        spacing: 0_u16,
30979        pending: 0_u16,
30980        loaded: 0_u16,
30981    };
30982    #[cfg(feature = "arbitrary")]
30983    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30984        use arbitrary::{Arbitrary, Unstructured};
30985        let mut buf = [0u8; 1024];
30986        rng.fill_bytes(&mut buf);
30987        let mut unstructured = Unstructured::new(&buf);
30988        Self::arbitrary(&mut unstructured).unwrap_or_default()
30989    }
30990}
30991impl Default for TERRAIN_REPORT_DATA {
30992    fn default() -> Self {
30993        Self::DEFAULT.clone()
30994    }
30995}
30996impl MessageData for TERRAIN_REPORT_DATA {
30997    type Message = MavMessage;
30998    const ID: u32 = 136u32;
30999    const NAME: &'static str = "TERRAIN_REPORT";
31000    const EXTRA_CRC: u8 = 1u8;
31001    const ENCODED_LEN: usize = 22usize;
31002    fn deser(
31003        _version: MavlinkVersion,
31004        __input: &[u8],
31005    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31006        let avail_len = __input.len();
31007        let mut payload_buf = [0; Self::ENCODED_LEN];
31008        let mut buf = if avail_len < Self::ENCODED_LEN {
31009            payload_buf[0..avail_len].copy_from_slice(__input);
31010            Bytes::new(&payload_buf)
31011        } else {
31012            Bytes::new(__input)
31013        };
31014        let mut __struct = Self::default();
31015        __struct.lat = buf.get_i32_le()?;
31016        __struct.lon = buf.get_i32_le()?;
31017        __struct.terrain_height = buf.get_f32_le()?;
31018        __struct.current_height = buf.get_f32_le()?;
31019        __struct.spacing = buf.get_u16_le()?;
31020        __struct.pending = buf.get_u16_le()?;
31021        __struct.loaded = buf.get_u16_le()?;
31022        Ok(__struct)
31023    }
31024    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31025        let mut __tmp = BytesMut::new(bytes);
31026        #[allow(clippy::absurd_extreme_comparisons)]
31027        #[allow(unused_comparisons)]
31028        if __tmp.remaining() < Self::ENCODED_LEN {
31029            panic!(
31030                "buffer is too small (need {} bytes, but got {})",
31031                Self::ENCODED_LEN,
31032                __tmp.remaining(),
31033            )
31034        }
31035        __tmp.put_i32_le(self.lat);
31036        __tmp.put_i32_le(self.lon);
31037        __tmp.put_f32_le(self.terrain_height);
31038        __tmp.put_f32_le(self.current_height);
31039        __tmp.put_u16_le(self.spacing);
31040        __tmp.put_u16_le(self.pending);
31041        __tmp.put_u16_le(self.loaded);
31042        if matches!(version, MavlinkVersion::V2) {
31043            let len = __tmp.len();
31044            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31045        } else {
31046            __tmp.len()
31047        }
31048    }
31049}
31050#[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
31051#[doc = ""]
31052#[doc = "ID: 133"]
31053#[derive(Debug, Clone, PartialEq)]
31054#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31055#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31056#[cfg_attr(feature = "ts", derive(TS))]
31057#[cfg_attr(feature = "ts", ts(export))]
31058pub struct TERRAIN_REQUEST_DATA {
31059    #[doc = "Bitmask of requested 4x4 grids (row major 8x7 array of grids, 56 bits)"]
31060    pub mask: u64,
31061    #[doc = "Latitude of SW corner of first grid"]
31062    pub lat: i32,
31063    #[doc = "Longitude of SW corner of first grid"]
31064    pub lon: i32,
31065    #[doc = "Grid spacing"]
31066    pub grid_spacing: u16,
31067}
31068impl TERRAIN_REQUEST_DATA {
31069    pub const ENCODED_LEN: usize = 18usize;
31070    pub const DEFAULT: Self = Self {
31071        mask: 0_u64,
31072        lat: 0_i32,
31073        lon: 0_i32,
31074        grid_spacing: 0_u16,
31075    };
31076    #[cfg(feature = "arbitrary")]
31077    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31078        use arbitrary::{Arbitrary, Unstructured};
31079        let mut buf = [0u8; 1024];
31080        rng.fill_bytes(&mut buf);
31081        let mut unstructured = Unstructured::new(&buf);
31082        Self::arbitrary(&mut unstructured).unwrap_or_default()
31083    }
31084}
31085impl Default for TERRAIN_REQUEST_DATA {
31086    fn default() -> Self {
31087        Self::DEFAULT.clone()
31088    }
31089}
31090impl MessageData for TERRAIN_REQUEST_DATA {
31091    type Message = MavMessage;
31092    const ID: u32 = 133u32;
31093    const NAME: &'static str = "TERRAIN_REQUEST";
31094    const EXTRA_CRC: u8 = 6u8;
31095    const ENCODED_LEN: usize = 18usize;
31096    fn deser(
31097        _version: MavlinkVersion,
31098        __input: &[u8],
31099    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31100        let avail_len = __input.len();
31101        let mut payload_buf = [0; Self::ENCODED_LEN];
31102        let mut buf = if avail_len < Self::ENCODED_LEN {
31103            payload_buf[0..avail_len].copy_from_slice(__input);
31104            Bytes::new(&payload_buf)
31105        } else {
31106            Bytes::new(__input)
31107        };
31108        let mut __struct = Self::default();
31109        __struct.mask = buf.get_u64_le()?;
31110        __struct.lat = buf.get_i32_le()?;
31111        __struct.lon = buf.get_i32_le()?;
31112        __struct.grid_spacing = buf.get_u16_le()?;
31113        Ok(__struct)
31114    }
31115    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31116        let mut __tmp = BytesMut::new(bytes);
31117        #[allow(clippy::absurd_extreme_comparisons)]
31118        #[allow(unused_comparisons)]
31119        if __tmp.remaining() < Self::ENCODED_LEN {
31120            panic!(
31121                "buffer is too small (need {} bytes, but got {})",
31122                Self::ENCODED_LEN,
31123                __tmp.remaining(),
31124            )
31125        }
31126        __tmp.put_u64_le(self.mask);
31127        __tmp.put_i32_le(self.lat);
31128        __tmp.put_i32_le(self.lon);
31129        __tmp.put_u16_le(self.grid_spacing);
31130        if matches!(version, MavlinkVersion::V2) {
31131            let len = __tmp.len();
31132            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31133        } else {
31134            __tmp.len()
31135        }
31136    }
31137}
31138#[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
31139#[doc = ""]
31140#[doc = "ID: 111"]
31141#[derive(Debug, Clone, PartialEq)]
31142#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31143#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31144#[cfg_attr(feature = "ts", derive(TS))]
31145#[cfg_attr(feature = "ts", ts(export))]
31146pub struct TIMESYNC_DATA {
31147    #[doc = "Time sync timestamp 1. Syncing: 0. Responding: Timestamp of responding component."]
31148    pub tc1: i64,
31149    #[doc = "Time sync timestamp 2. Timestamp of syncing component (mirrored in response)."]
31150    pub ts1: i64,
31151    #[doc = "Target system id. Request: 0 (broadcast) or id of specific system. Response must contain system id of the requesting component."]
31152    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31153    pub target_system: u8,
31154    #[doc = "Target component id. Request: 0 (broadcast) or id of specific component. Response must contain component id of the requesting component."]
31155    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31156    pub target_component: u8,
31157}
31158impl TIMESYNC_DATA {
31159    pub const ENCODED_LEN: usize = 18usize;
31160    pub const DEFAULT: Self = Self {
31161        tc1: 0_i64,
31162        ts1: 0_i64,
31163        target_system: 0_u8,
31164        target_component: 0_u8,
31165    };
31166    #[cfg(feature = "arbitrary")]
31167    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31168        use arbitrary::{Arbitrary, Unstructured};
31169        let mut buf = [0u8; 1024];
31170        rng.fill_bytes(&mut buf);
31171        let mut unstructured = Unstructured::new(&buf);
31172        Self::arbitrary(&mut unstructured).unwrap_or_default()
31173    }
31174}
31175impl Default for TIMESYNC_DATA {
31176    fn default() -> Self {
31177        Self::DEFAULT.clone()
31178    }
31179}
31180impl MessageData for TIMESYNC_DATA {
31181    type Message = MavMessage;
31182    const ID: u32 = 111u32;
31183    const NAME: &'static str = "TIMESYNC";
31184    const EXTRA_CRC: u8 = 34u8;
31185    const ENCODED_LEN: usize = 18usize;
31186    fn deser(
31187        _version: MavlinkVersion,
31188        __input: &[u8],
31189    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31190        let avail_len = __input.len();
31191        let mut payload_buf = [0; Self::ENCODED_LEN];
31192        let mut buf = if avail_len < Self::ENCODED_LEN {
31193            payload_buf[0..avail_len].copy_from_slice(__input);
31194            Bytes::new(&payload_buf)
31195        } else {
31196            Bytes::new(__input)
31197        };
31198        let mut __struct = Self::default();
31199        __struct.tc1 = buf.get_i64_le()?;
31200        __struct.ts1 = buf.get_i64_le()?;
31201        __struct.target_system = buf.get_u8()?;
31202        __struct.target_component = buf.get_u8()?;
31203        Ok(__struct)
31204    }
31205    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31206        let mut __tmp = BytesMut::new(bytes);
31207        #[allow(clippy::absurd_extreme_comparisons)]
31208        #[allow(unused_comparisons)]
31209        if __tmp.remaining() < Self::ENCODED_LEN {
31210            panic!(
31211                "buffer is too small (need {} bytes, but got {})",
31212                Self::ENCODED_LEN,
31213                __tmp.remaining(),
31214            )
31215        }
31216        __tmp.put_i64_le(self.tc1);
31217        __tmp.put_i64_le(self.ts1);
31218        if matches!(version, MavlinkVersion::V2) {
31219            __tmp.put_u8(self.target_system);
31220            __tmp.put_u8(self.target_component);
31221            let len = __tmp.len();
31222            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31223        } else {
31224            __tmp.len()
31225        }
31226    }
31227}
31228#[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
31229#[doc = ""]
31230#[doc = "ID: 380"]
31231#[derive(Debug, Clone, PartialEq)]
31232#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31233#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31234#[cfg_attr(feature = "ts", derive(TS))]
31235#[cfg_attr(feature = "ts", ts(export))]
31236pub struct TIME_ESTIMATE_TO_TARGET_DATA {
31237    #[doc = "Estimated time to complete the vehicle's configured \"safe return\" action from its current position (e.g. RTL, Smart RTL, etc.). -1 indicates that the vehicle is landed, or that no time estimate available."]
31238    pub safe_return: i32,
31239    #[doc = "Estimated time for vehicle to complete the LAND action from its current position. -1 indicates that the vehicle is landed, or that no time estimate available."]
31240    pub land: i32,
31241    #[doc = "Estimated time for reaching/completing the currently active mission item. -1 means no time estimate available."]
31242    pub mission_next_item: i32,
31243    #[doc = "Estimated time for completing the current mission. -1 means no mission active and/or no estimate available."]
31244    pub mission_end: i32,
31245    #[doc = "Estimated time for completing the current commanded action (i.e. Go To, Takeoff, Land, etc.). -1 means no action active and/or no estimate available."]
31246    pub commanded_action: i32,
31247}
31248impl TIME_ESTIMATE_TO_TARGET_DATA {
31249    pub const ENCODED_LEN: usize = 20usize;
31250    pub const DEFAULT: Self = Self {
31251        safe_return: 0_i32,
31252        land: 0_i32,
31253        mission_next_item: 0_i32,
31254        mission_end: 0_i32,
31255        commanded_action: 0_i32,
31256    };
31257    #[cfg(feature = "arbitrary")]
31258    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31259        use arbitrary::{Arbitrary, Unstructured};
31260        let mut buf = [0u8; 1024];
31261        rng.fill_bytes(&mut buf);
31262        let mut unstructured = Unstructured::new(&buf);
31263        Self::arbitrary(&mut unstructured).unwrap_or_default()
31264    }
31265}
31266impl Default for TIME_ESTIMATE_TO_TARGET_DATA {
31267    fn default() -> Self {
31268        Self::DEFAULT.clone()
31269    }
31270}
31271impl MessageData for TIME_ESTIMATE_TO_TARGET_DATA {
31272    type Message = MavMessage;
31273    const ID: u32 = 380u32;
31274    const NAME: &'static str = "TIME_ESTIMATE_TO_TARGET";
31275    const EXTRA_CRC: u8 = 232u8;
31276    const ENCODED_LEN: usize = 20usize;
31277    fn deser(
31278        _version: MavlinkVersion,
31279        __input: &[u8],
31280    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31281        let avail_len = __input.len();
31282        let mut payload_buf = [0; Self::ENCODED_LEN];
31283        let mut buf = if avail_len < Self::ENCODED_LEN {
31284            payload_buf[0..avail_len].copy_from_slice(__input);
31285            Bytes::new(&payload_buf)
31286        } else {
31287            Bytes::new(__input)
31288        };
31289        let mut __struct = Self::default();
31290        __struct.safe_return = buf.get_i32_le()?;
31291        __struct.land = buf.get_i32_le()?;
31292        __struct.mission_next_item = buf.get_i32_le()?;
31293        __struct.mission_end = buf.get_i32_le()?;
31294        __struct.commanded_action = buf.get_i32_le()?;
31295        Ok(__struct)
31296    }
31297    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31298        let mut __tmp = BytesMut::new(bytes);
31299        #[allow(clippy::absurd_extreme_comparisons)]
31300        #[allow(unused_comparisons)]
31301        if __tmp.remaining() < Self::ENCODED_LEN {
31302            panic!(
31303                "buffer is too small (need {} bytes, but got {})",
31304                Self::ENCODED_LEN,
31305                __tmp.remaining(),
31306            )
31307        }
31308        __tmp.put_i32_le(self.safe_return);
31309        __tmp.put_i32_le(self.land);
31310        __tmp.put_i32_le(self.mission_next_item);
31311        __tmp.put_i32_le(self.mission_end);
31312        __tmp.put_i32_le(self.commanded_action);
31313        if matches!(version, MavlinkVersion::V2) {
31314            let len = __tmp.len();
31315            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31316        } else {
31317            __tmp.len()
31318        }
31319    }
31320}
31321#[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
31322#[doc = ""]
31323#[doc = "ID: 333"]
31324#[derive(Debug, Clone, PartialEq)]
31325#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31326#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31327#[cfg_attr(feature = "ts", derive(TS))]
31328#[cfg_attr(feature = "ts", ts(export))]
31329pub struct TRAJECTORY_REPRESENTATION_BEZIER_DATA {
31330    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
31331    pub time_usec: u64,
31332    #[doc = "X-coordinate of bezier control points. Set to NaN if not being used"]
31333    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31334    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31335    pub pos_x: [f32; 5],
31336    #[doc = "Y-coordinate of bezier control points. Set to NaN if not being used"]
31337    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31338    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31339    pub pos_y: [f32; 5],
31340    #[doc = "Z-coordinate of bezier control points. Set to NaN if not being used"]
31341    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31342    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31343    pub pos_z: [f32; 5],
31344    #[doc = "Bezier time horizon. Set to NaN if velocity/acceleration should not be incorporated"]
31345    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31346    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31347    pub delta: [f32; 5],
31348    #[doc = "Yaw. Set to NaN for unchanged"]
31349    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31350    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31351    pub pos_yaw: [f32; 5],
31352    #[doc = "Number of valid control points (up-to 5 points are possible)"]
31353    pub valid_points: u8,
31354}
31355impl TRAJECTORY_REPRESENTATION_BEZIER_DATA {
31356    pub const ENCODED_LEN: usize = 109usize;
31357    pub const DEFAULT: Self = Self {
31358        time_usec: 0_u64,
31359        pos_x: [0.0_f32; 5usize],
31360        pos_y: [0.0_f32; 5usize],
31361        pos_z: [0.0_f32; 5usize],
31362        delta: [0.0_f32; 5usize],
31363        pos_yaw: [0.0_f32; 5usize],
31364        valid_points: 0_u8,
31365    };
31366    #[cfg(feature = "arbitrary")]
31367    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31368        use arbitrary::{Arbitrary, Unstructured};
31369        let mut buf = [0u8; 1024];
31370        rng.fill_bytes(&mut buf);
31371        let mut unstructured = Unstructured::new(&buf);
31372        Self::arbitrary(&mut unstructured).unwrap_or_default()
31373    }
31374}
31375impl Default for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
31376    fn default() -> Self {
31377        Self::DEFAULT.clone()
31378    }
31379}
31380impl MessageData for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
31381    type Message = MavMessage;
31382    const ID: u32 = 333u32;
31383    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_BEZIER";
31384    const EXTRA_CRC: u8 = 231u8;
31385    const ENCODED_LEN: usize = 109usize;
31386    fn deser(
31387        _version: MavlinkVersion,
31388        __input: &[u8],
31389    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31390        let avail_len = __input.len();
31391        let mut payload_buf = [0; Self::ENCODED_LEN];
31392        let mut buf = if avail_len < Self::ENCODED_LEN {
31393            payload_buf[0..avail_len].copy_from_slice(__input);
31394            Bytes::new(&payload_buf)
31395        } else {
31396            Bytes::new(__input)
31397        };
31398        let mut __struct = Self::default();
31399        __struct.time_usec = buf.get_u64_le()?;
31400        for v in &mut __struct.pos_x {
31401            let val = buf.get_f32_le()?;
31402            *v = val;
31403        }
31404        for v in &mut __struct.pos_y {
31405            let val = buf.get_f32_le()?;
31406            *v = val;
31407        }
31408        for v in &mut __struct.pos_z {
31409            let val = buf.get_f32_le()?;
31410            *v = val;
31411        }
31412        for v in &mut __struct.delta {
31413            let val = buf.get_f32_le()?;
31414            *v = val;
31415        }
31416        for v in &mut __struct.pos_yaw {
31417            let val = buf.get_f32_le()?;
31418            *v = val;
31419        }
31420        __struct.valid_points = buf.get_u8()?;
31421        Ok(__struct)
31422    }
31423    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31424        let mut __tmp = BytesMut::new(bytes);
31425        #[allow(clippy::absurd_extreme_comparisons)]
31426        #[allow(unused_comparisons)]
31427        if __tmp.remaining() < Self::ENCODED_LEN {
31428            panic!(
31429                "buffer is too small (need {} bytes, but got {})",
31430                Self::ENCODED_LEN,
31431                __tmp.remaining(),
31432            )
31433        }
31434        __tmp.put_u64_le(self.time_usec);
31435        for val in &self.pos_x {
31436            __tmp.put_f32_le(*val);
31437        }
31438        for val in &self.pos_y {
31439            __tmp.put_f32_le(*val);
31440        }
31441        for val in &self.pos_z {
31442            __tmp.put_f32_le(*val);
31443        }
31444        for val in &self.delta {
31445            __tmp.put_f32_le(*val);
31446        }
31447        for val in &self.pos_yaw {
31448            __tmp.put_f32_le(*val);
31449        }
31450        __tmp.put_u8(self.valid_points);
31451        if matches!(version, MavlinkVersion::V2) {
31452            let len = __tmp.len();
31453            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31454        } else {
31455            __tmp.len()
31456        }
31457    }
31458}
31459#[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
31460#[doc = ""]
31461#[doc = "ID: 332"]
31462#[derive(Debug, Clone, PartialEq)]
31463#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31464#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31465#[cfg_attr(feature = "ts", derive(TS))]
31466#[cfg_attr(feature = "ts", ts(export))]
31467pub struct TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
31468    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
31469    pub time_usec: u64,
31470    #[doc = "X-coordinate of waypoint, set to NaN if not being used"]
31471    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31472    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31473    pub pos_x: [f32; 5],
31474    #[doc = "Y-coordinate of waypoint, set to NaN if not being used"]
31475    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31476    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31477    pub pos_y: [f32; 5],
31478    #[doc = "Z-coordinate of waypoint, set to NaN if not being used"]
31479    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31480    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31481    pub pos_z: [f32; 5],
31482    #[doc = "X-velocity of waypoint, set to NaN if not being used"]
31483    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31484    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31485    pub vel_x: [f32; 5],
31486    #[doc = "Y-velocity of waypoint, set to NaN if not being used"]
31487    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31488    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31489    pub vel_y: [f32; 5],
31490    #[doc = "Z-velocity of waypoint, set to NaN if not being used"]
31491    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31492    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31493    pub vel_z: [f32; 5],
31494    #[doc = "X-acceleration of waypoint, set to NaN if not being used"]
31495    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31496    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31497    pub acc_x: [f32; 5],
31498    #[doc = "Y-acceleration of waypoint, set to NaN if not being used"]
31499    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31500    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31501    pub acc_y: [f32; 5],
31502    #[doc = "Z-acceleration of waypoint, set to NaN if not being used"]
31503    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31504    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31505    pub acc_z: [f32; 5],
31506    #[doc = "Yaw angle, set to NaN if not being used"]
31507    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31508    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31509    pub pos_yaw: [f32; 5],
31510    #[doc = "Yaw rate, set to NaN if not being used"]
31511    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31512    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31513    pub vel_yaw: [f32; 5],
31514    #[doc = "MAV_CMD command id of waypoint, set to UINT16_MAX if not being used."]
31515    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31516    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31517    pub command: [u16; 5],
31518    #[doc = "Number of valid points (up-to 5 waypoints are possible)"]
31519    pub valid_points: u8,
31520}
31521impl TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
31522    pub const ENCODED_LEN: usize = 239usize;
31523    pub const DEFAULT: Self = Self {
31524        time_usec: 0_u64,
31525        pos_x: [0.0_f32; 5usize],
31526        pos_y: [0.0_f32; 5usize],
31527        pos_z: [0.0_f32; 5usize],
31528        vel_x: [0.0_f32; 5usize],
31529        vel_y: [0.0_f32; 5usize],
31530        vel_z: [0.0_f32; 5usize],
31531        acc_x: [0.0_f32; 5usize],
31532        acc_y: [0.0_f32; 5usize],
31533        acc_z: [0.0_f32; 5usize],
31534        pos_yaw: [0.0_f32; 5usize],
31535        vel_yaw: [0.0_f32; 5usize],
31536        command: [0_u16; 5usize],
31537        valid_points: 0_u8,
31538    };
31539    #[cfg(feature = "arbitrary")]
31540    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31541        use arbitrary::{Arbitrary, Unstructured};
31542        let mut buf = [0u8; 1024];
31543        rng.fill_bytes(&mut buf);
31544        let mut unstructured = Unstructured::new(&buf);
31545        Self::arbitrary(&mut unstructured).unwrap_or_default()
31546    }
31547}
31548impl Default for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
31549    fn default() -> Self {
31550        Self::DEFAULT.clone()
31551    }
31552}
31553impl MessageData for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
31554    type Message = MavMessage;
31555    const ID: u32 = 332u32;
31556    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_WAYPOINTS";
31557    const EXTRA_CRC: u8 = 236u8;
31558    const ENCODED_LEN: usize = 239usize;
31559    fn deser(
31560        _version: MavlinkVersion,
31561        __input: &[u8],
31562    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31563        let avail_len = __input.len();
31564        let mut payload_buf = [0; Self::ENCODED_LEN];
31565        let mut buf = if avail_len < Self::ENCODED_LEN {
31566            payload_buf[0..avail_len].copy_from_slice(__input);
31567            Bytes::new(&payload_buf)
31568        } else {
31569            Bytes::new(__input)
31570        };
31571        let mut __struct = Self::default();
31572        __struct.time_usec = buf.get_u64_le()?;
31573        for v in &mut __struct.pos_x {
31574            let val = buf.get_f32_le()?;
31575            *v = val;
31576        }
31577        for v in &mut __struct.pos_y {
31578            let val = buf.get_f32_le()?;
31579            *v = val;
31580        }
31581        for v in &mut __struct.pos_z {
31582            let val = buf.get_f32_le()?;
31583            *v = val;
31584        }
31585        for v in &mut __struct.vel_x {
31586            let val = buf.get_f32_le()?;
31587            *v = val;
31588        }
31589        for v in &mut __struct.vel_y {
31590            let val = buf.get_f32_le()?;
31591            *v = val;
31592        }
31593        for v in &mut __struct.vel_z {
31594            let val = buf.get_f32_le()?;
31595            *v = val;
31596        }
31597        for v in &mut __struct.acc_x {
31598            let val = buf.get_f32_le()?;
31599            *v = val;
31600        }
31601        for v in &mut __struct.acc_y {
31602            let val = buf.get_f32_le()?;
31603            *v = val;
31604        }
31605        for v in &mut __struct.acc_z {
31606            let val = buf.get_f32_le()?;
31607            *v = val;
31608        }
31609        for v in &mut __struct.pos_yaw {
31610            let val = buf.get_f32_le()?;
31611            *v = val;
31612        }
31613        for v in &mut __struct.vel_yaw {
31614            let val = buf.get_f32_le()?;
31615            *v = val;
31616        }
31617        for v in &mut __struct.command {
31618            let val = buf.get_u16_le()?;
31619            *v = val;
31620        }
31621        __struct.valid_points = buf.get_u8()?;
31622        Ok(__struct)
31623    }
31624    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31625        let mut __tmp = BytesMut::new(bytes);
31626        #[allow(clippy::absurd_extreme_comparisons)]
31627        #[allow(unused_comparisons)]
31628        if __tmp.remaining() < Self::ENCODED_LEN {
31629            panic!(
31630                "buffer is too small (need {} bytes, but got {})",
31631                Self::ENCODED_LEN,
31632                __tmp.remaining(),
31633            )
31634        }
31635        __tmp.put_u64_le(self.time_usec);
31636        for val in &self.pos_x {
31637            __tmp.put_f32_le(*val);
31638        }
31639        for val in &self.pos_y {
31640            __tmp.put_f32_le(*val);
31641        }
31642        for val in &self.pos_z {
31643            __tmp.put_f32_le(*val);
31644        }
31645        for val in &self.vel_x {
31646            __tmp.put_f32_le(*val);
31647        }
31648        for val in &self.vel_y {
31649            __tmp.put_f32_le(*val);
31650        }
31651        for val in &self.vel_z {
31652            __tmp.put_f32_le(*val);
31653        }
31654        for val in &self.acc_x {
31655            __tmp.put_f32_le(*val);
31656        }
31657        for val in &self.acc_y {
31658            __tmp.put_f32_le(*val);
31659        }
31660        for val in &self.acc_z {
31661            __tmp.put_f32_le(*val);
31662        }
31663        for val in &self.pos_yaw {
31664            __tmp.put_f32_le(*val);
31665        }
31666        for val in &self.vel_yaw {
31667            __tmp.put_f32_le(*val);
31668        }
31669        for val in &self.command {
31670            __tmp.put_u16_le(*val);
31671        }
31672        __tmp.put_u8(self.valid_points);
31673        if matches!(version, MavlinkVersion::V2) {
31674            let len = __tmp.len();
31675            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31676        } else {
31677            __tmp.len()
31678        }
31679    }
31680}
31681#[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
31682#[doc = ""]
31683#[doc = "ID: 385"]
31684#[derive(Debug, Clone, PartialEq)]
31685#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31686#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31687#[cfg_attr(feature = "ts", derive(TS))]
31688#[cfg_attr(feature = "ts", ts(export))]
31689pub struct TUNNEL_DATA {
31690    #[doc = "A code that identifies the content of the payload (0 for unknown, which is the default). If this code is less than 32768, it is a 'registered' payload type and the corresponding code should be added to the MAV_TUNNEL_PAYLOAD_TYPE enum. Software creators can register blocks of types as needed. Codes greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
31691    pub payload_type: MavTunnelPayloadType,
31692    #[doc = "System ID (can be 0 for broadcast, but this is discouraged)"]
31693    pub target_system: u8,
31694    #[doc = "Component ID (can be 0 for broadcast, but this is discouraged)"]
31695    pub target_component: u8,
31696    #[doc = "Length of the data transported in payload"]
31697    pub payload_length: u8,
31698    #[doc = "Variable length payload. The payload length is defined by payload_length. The entire content of this block is opaque unless you understand the encoding specified by payload_type."]
31699    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31700    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31701    pub payload: [u8; 128],
31702}
31703impl TUNNEL_DATA {
31704    pub const ENCODED_LEN: usize = 133usize;
31705    pub const DEFAULT: Self = Self {
31706        payload_type: MavTunnelPayloadType::DEFAULT,
31707        target_system: 0_u8,
31708        target_component: 0_u8,
31709        payload_length: 0_u8,
31710        payload: [0_u8; 128usize],
31711    };
31712    #[cfg(feature = "arbitrary")]
31713    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31714        use arbitrary::{Arbitrary, Unstructured};
31715        let mut buf = [0u8; 1024];
31716        rng.fill_bytes(&mut buf);
31717        let mut unstructured = Unstructured::new(&buf);
31718        Self::arbitrary(&mut unstructured).unwrap_or_default()
31719    }
31720}
31721impl Default for TUNNEL_DATA {
31722    fn default() -> Self {
31723        Self::DEFAULT.clone()
31724    }
31725}
31726impl MessageData for TUNNEL_DATA {
31727    type Message = MavMessage;
31728    const ID: u32 = 385u32;
31729    const NAME: &'static str = "TUNNEL";
31730    const EXTRA_CRC: u8 = 147u8;
31731    const ENCODED_LEN: usize = 133usize;
31732    fn deser(
31733        _version: MavlinkVersion,
31734        __input: &[u8],
31735    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31736        let avail_len = __input.len();
31737        let mut payload_buf = [0; Self::ENCODED_LEN];
31738        let mut buf = if avail_len < Self::ENCODED_LEN {
31739            payload_buf[0..avail_len].copy_from_slice(__input);
31740            Bytes::new(&payload_buf)
31741        } else {
31742            Bytes::new(__input)
31743        };
31744        let mut __struct = Self::default();
31745        let tmp = buf.get_u16_le()?;
31746        __struct.payload_type = FromPrimitive::from_u16(tmp).ok_or(
31747            ::mavlink_core::error::ParserError::InvalidEnum {
31748                enum_type: "MavTunnelPayloadType",
31749                value: tmp as u64,
31750            },
31751        )?;
31752        __struct.target_system = buf.get_u8()?;
31753        __struct.target_component = buf.get_u8()?;
31754        __struct.payload_length = buf.get_u8()?;
31755        for v in &mut __struct.payload {
31756            let val = buf.get_u8()?;
31757            *v = val;
31758        }
31759        Ok(__struct)
31760    }
31761    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31762        let mut __tmp = BytesMut::new(bytes);
31763        #[allow(clippy::absurd_extreme_comparisons)]
31764        #[allow(unused_comparisons)]
31765        if __tmp.remaining() < Self::ENCODED_LEN {
31766            panic!(
31767                "buffer is too small (need {} bytes, but got {})",
31768                Self::ENCODED_LEN,
31769                __tmp.remaining(),
31770            )
31771        }
31772        __tmp.put_u16_le(self.payload_type as u16);
31773        __tmp.put_u8(self.target_system);
31774        __tmp.put_u8(self.target_component);
31775        __tmp.put_u8(self.payload_length);
31776        for val in &self.payload {
31777            __tmp.put_u8(*val);
31778        }
31779        if matches!(version, MavlinkVersion::V2) {
31780            let len = __tmp.len();
31781            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31782        } else {
31783            __tmp.len()
31784        }
31785    }
31786}
31787#[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
31788#[doc = ""]
31789#[doc = "ID: 311"]
31790#[derive(Debug, Clone, PartialEq)]
31791#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31792#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31793#[cfg_attr(feature = "ts", derive(TS))]
31794#[cfg_attr(feature = "ts", ts(export))]
31795pub struct UAVCAN_NODE_INFO_DATA {
31796    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
31797    pub time_usec: u64,
31798    #[doc = "Time since the start-up of the node."]
31799    pub uptime_sec: u32,
31800    #[doc = "Version control system (VCS) revision identifier (e.g. git short commit hash). 0 if unknown."]
31801    pub sw_vcs_commit: u32,
31802    #[doc = "Node name string. For example, \"sapog.px4.io\"."]
31803    #[cfg_attr(feature = "ts", ts(type = "string"))]
31804    pub name: CharArray<80>,
31805    #[doc = "Hardware major version number."]
31806    pub hw_version_major: u8,
31807    #[doc = "Hardware minor version number."]
31808    pub hw_version_minor: u8,
31809    #[doc = "Hardware unique 128-bit ID."]
31810    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31811    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
31812    pub hw_unique_id: [u8; 16],
31813    #[doc = "Software major version number."]
31814    pub sw_version_major: u8,
31815    #[doc = "Software minor version number."]
31816    pub sw_version_minor: u8,
31817}
31818impl UAVCAN_NODE_INFO_DATA {
31819    pub const ENCODED_LEN: usize = 116usize;
31820    pub const DEFAULT: Self = Self {
31821        time_usec: 0_u64,
31822        uptime_sec: 0_u32,
31823        sw_vcs_commit: 0_u32,
31824        name: CharArray::new([0_u8; 80usize]),
31825        hw_version_major: 0_u8,
31826        hw_version_minor: 0_u8,
31827        hw_unique_id: [0_u8; 16usize],
31828        sw_version_major: 0_u8,
31829        sw_version_minor: 0_u8,
31830    };
31831    #[cfg(feature = "arbitrary")]
31832    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31833        use arbitrary::{Arbitrary, Unstructured};
31834        let mut buf = [0u8; 1024];
31835        rng.fill_bytes(&mut buf);
31836        let mut unstructured = Unstructured::new(&buf);
31837        Self::arbitrary(&mut unstructured).unwrap_or_default()
31838    }
31839}
31840impl Default for UAVCAN_NODE_INFO_DATA {
31841    fn default() -> Self {
31842        Self::DEFAULT.clone()
31843    }
31844}
31845impl MessageData for UAVCAN_NODE_INFO_DATA {
31846    type Message = MavMessage;
31847    const ID: u32 = 311u32;
31848    const NAME: &'static str = "UAVCAN_NODE_INFO";
31849    const EXTRA_CRC: u8 = 95u8;
31850    const ENCODED_LEN: usize = 116usize;
31851    fn deser(
31852        _version: MavlinkVersion,
31853        __input: &[u8],
31854    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31855        let avail_len = __input.len();
31856        let mut payload_buf = [0; Self::ENCODED_LEN];
31857        let mut buf = if avail_len < Self::ENCODED_LEN {
31858            payload_buf[0..avail_len].copy_from_slice(__input);
31859            Bytes::new(&payload_buf)
31860        } else {
31861            Bytes::new(__input)
31862        };
31863        let mut __struct = Self::default();
31864        __struct.time_usec = buf.get_u64_le()?;
31865        __struct.uptime_sec = buf.get_u32_le()?;
31866        __struct.sw_vcs_commit = buf.get_u32_le()?;
31867        let mut tmp = [0_u8; 80usize];
31868        for v in &mut tmp {
31869            *v = buf.get_u8()?;
31870        }
31871        __struct.name = CharArray::new(tmp);
31872        __struct.hw_version_major = buf.get_u8()?;
31873        __struct.hw_version_minor = buf.get_u8()?;
31874        for v in &mut __struct.hw_unique_id {
31875            let val = buf.get_u8()?;
31876            *v = val;
31877        }
31878        __struct.sw_version_major = buf.get_u8()?;
31879        __struct.sw_version_minor = buf.get_u8()?;
31880        Ok(__struct)
31881    }
31882    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31883        let mut __tmp = BytesMut::new(bytes);
31884        #[allow(clippy::absurd_extreme_comparisons)]
31885        #[allow(unused_comparisons)]
31886        if __tmp.remaining() < Self::ENCODED_LEN {
31887            panic!(
31888                "buffer is too small (need {} bytes, but got {})",
31889                Self::ENCODED_LEN,
31890                __tmp.remaining(),
31891            )
31892        }
31893        __tmp.put_u64_le(self.time_usec);
31894        __tmp.put_u32_le(self.uptime_sec);
31895        __tmp.put_u32_le(self.sw_vcs_commit);
31896        for val in &self.name {
31897            __tmp.put_u8(*val);
31898        }
31899        __tmp.put_u8(self.hw_version_major);
31900        __tmp.put_u8(self.hw_version_minor);
31901        for val in &self.hw_unique_id {
31902            __tmp.put_u8(*val);
31903        }
31904        __tmp.put_u8(self.sw_version_major);
31905        __tmp.put_u8(self.sw_version_minor);
31906        if matches!(version, MavlinkVersion::V2) {
31907            let len = __tmp.len();
31908            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31909        } else {
31910            __tmp.len()
31911        }
31912    }
31913}
31914#[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
31915#[doc = ""]
31916#[doc = "ID: 310"]
31917#[derive(Debug, Clone, PartialEq)]
31918#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31919#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31920#[cfg_attr(feature = "ts", derive(TS))]
31921#[cfg_attr(feature = "ts", ts(export))]
31922pub struct UAVCAN_NODE_STATUS_DATA {
31923    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
31924    pub time_usec: u64,
31925    #[doc = "Time since the start-up of the node."]
31926    pub uptime_sec: u32,
31927    #[doc = "Vendor-specific status information."]
31928    pub vendor_specific_status_code: u16,
31929    #[doc = "Generalized node health status."]
31930    pub health: UavcanNodeHealth,
31931    #[doc = "Generalized operating mode."]
31932    pub mode: UavcanNodeMode,
31933    #[doc = "Not used currently."]
31934    pub sub_mode: u8,
31935}
31936impl UAVCAN_NODE_STATUS_DATA {
31937    pub const ENCODED_LEN: usize = 17usize;
31938    pub const DEFAULT: Self = Self {
31939        time_usec: 0_u64,
31940        uptime_sec: 0_u32,
31941        vendor_specific_status_code: 0_u16,
31942        health: UavcanNodeHealth::DEFAULT,
31943        mode: UavcanNodeMode::DEFAULT,
31944        sub_mode: 0_u8,
31945    };
31946    #[cfg(feature = "arbitrary")]
31947    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31948        use arbitrary::{Arbitrary, Unstructured};
31949        let mut buf = [0u8; 1024];
31950        rng.fill_bytes(&mut buf);
31951        let mut unstructured = Unstructured::new(&buf);
31952        Self::arbitrary(&mut unstructured).unwrap_or_default()
31953    }
31954}
31955impl Default for UAVCAN_NODE_STATUS_DATA {
31956    fn default() -> Self {
31957        Self::DEFAULT.clone()
31958    }
31959}
31960impl MessageData for UAVCAN_NODE_STATUS_DATA {
31961    type Message = MavMessage;
31962    const ID: u32 = 310u32;
31963    const NAME: &'static str = "UAVCAN_NODE_STATUS";
31964    const EXTRA_CRC: u8 = 28u8;
31965    const ENCODED_LEN: usize = 17usize;
31966    fn deser(
31967        _version: MavlinkVersion,
31968        __input: &[u8],
31969    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31970        let avail_len = __input.len();
31971        let mut payload_buf = [0; Self::ENCODED_LEN];
31972        let mut buf = if avail_len < Self::ENCODED_LEN {
31973            payload_buf[0..avail_len].copy_from_slice(__input);
31974            Bytes::new(&payload_buf)
31975        } else {
31976            Bytes::new(__input)
31977        };
31978        let mut __struct = Self::default();
31979        __struct.time_usec = buf.get_u64_le()?;
31980        __struct.uptime_sec = buf.get_u32_le()?;
31981        __struct.vendor_specific_status_code = buf.get_u16_le()?;
31982        let tmp = buf.get_u8()?;
31983        __struct.health =
31984            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31985                enum_type: "UavcanNodeHealth",
31986                value: tmp as u64,
31987            })?;
31988        let tmp = buf.get_u8()?;
31989        __struct.mode =
31990            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31991                enum_type: "UavcanNodeMode",
31992                value: tmp as u64,
31993            })?;
31994        __struct.sub_mode = buf.get_u8()?;
31995        Ok(__struct)
31996    }
31997    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31998        let mut __tmp = BytesMut::new(bytes);
31999        #[allow(clippy::absurd_extreme_comparisons)]
32000        #[allow(unused_comparisons)]
32001        if __tmp.remaining() < Self::ENCODED_LEN {
32002            panic!(
32003                "buffer is too small (need {} bytes, but got {})",
32004                Self::ENCODED_LEN,
32005                __tmp.remaining(),
32006            )
32007        }
32008        __tmp.put_u64_le(self.time_usec);
32009        __tmp.put_u32_le(self.uptime_sec);
32010        __tmp.put_u16_le(self.vendor_specific_status_code);
32011        __tmp.put_u8(self.health as u8);
32012        __tmp.put_u8(self.mode as u8);
32013        __tmp.put_u8(self.sub_mode);
32014        if matches!(version, MavlinkVersion::V2) {
32015            let len = __tmp.len();
32016            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32017        } else {
32018            __tmp.len()
32019        }
32020    }
32021}
32022#[doc = "The global position resulting from GPS and sensor fusion."]
32023#[doc = ""]
32024#[doc = "ID: 340"]
32025#[derive(Debug, Clone, PartialEq)]
32026#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32027#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32028#[cfg_attr(feature = "ts", derive(TS))]
32029#[cfg_attr(feature = "ts", ts(export))]
32030pub struct UTM_GLOBAL_POSITION_DATA {
32031    #[doc = "Time of applicability of position (microseconds since UNIX epoch)."]
32032    pub time: u64,
32033    #[doc = "Latitude (WGS84)"]
32034    pub lat: i32,
32035    #[doc = "Longitude (WGS84)"]
32036    pub lon: i32,
32037    #[doc = "Altitude (WGS84)"]
32038    pub alt: i32,
32039    #[doc = "Altitude above ground"]
32040    pub relative_alt: i32,
32041    #[doc = "Next waypoint, latitude (WGS84)"]
32042    pub next_lat: i32,
32043    #[doc = "Next waypoint, longitude (WGS84)"]
32044    pub next_lon: i32,
32045    #[doc = "Next waypoint, altitude (WGS84)"]
32046    pub next_alt: i32,
32047    #[doc = "Ground X speed (latitude, positive north)"]
32048    pub vx: i16,
32049    #[doc = "Ground Y speed (longitude, positive east)"]
32050    pub vy: i16,
32051    #[doc = "Ground Z speed (altitude, positive down)"]
32052    pub vz: i16,
32053    #[doc = "Horizontal position uncertainty (standard deviation)"]
32054    pub h_acc: u16,
32055    #[doc = "Altitude uncertainty (standard deviation)"]
32056    pub v_acc: u16,
32057    #[doc = "Speed uncertainty (standard deviation)"]
32058    pub vel_acc: u16,
32059    #[doc = "Time until next update. Set to 0 if unknown or in data driven mode."]
32060    pub update_rate: u16,
32061    #[doc = "Unique UAS ID."]
32062    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32063    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32064    pub uas_id: [u8; 18],
32065    #[doc = "Flight state"]
32066    pub flight_state: UtmFlightState,
32067    #[doc = "Bitwise OR combination of the data available flags."]
32068    pub flags: UtmDataAvailFlags,
32069}
32070impl UTM_GLOBAL_POSITION_DATA {
32071    pub const ENCODED_LEN: usize = 70usize;
32072    pub const DEFAULT: Self = Self {
32073        time: 0_u64,
32074        lat: 0_i32,
32075        lon: 0_i32,
32076        alt: 0_i32,
32077        relative_alt: 0_i32,
32078        next_lat: 0_i32,
32079        next_lon: 0_i32,
32080        next_alt: 0_i32,
32081        vx: 0_i16,
32082        vy: 0_i16,
32083        vz: 0_i16,
32084        h_acc: 0_u16,
32085        v_acc: 0_u16,
32086        vel_acc: 0_u16,
32087        update_rate: 0_u16,
32088        uas_id: [0_u8; 18usize],
32089        flight_state: UtmFlightState::DEFAULT,
32090        flags: UtmDataAvailFlags::DEFAULT,
32091    };
32092    #[cfg(feature = "arbitrary")]
32093    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32094        use arbitrary::{Arbitrary, Unstructured};
32095        let mut buf = [0u8; 1024];
32096        rng.fill_bytes(&mut buf);
32097        let mut unstructured = Unstructured::new(&buf);
32098        Self::arbitrary(&mut unstructured).unwrap_or_default()
32099    }
32100}
32101impl Default for UTM_GLOBAL_POSITION_DATA {
32102    fn default() -> Self {
32103        Self::DEFAULT.clone()
32104    }
32105}
32106impl MessageData for UTM_GLOBAL_POSITION_DATA {
32107    type Message = MavMessage;
32108    const ID: u32 = 340u32;
32109    const NAME: &'static str = "UTM_GLOBAL_POSITION";
32110    const EXTRA_CRC: u8 = 99u8;
32111    const ENCODED_LEN: usize = 70usize;
32112    fn deser(
32113        _version: MavlinkVersion,
32114        __input: &[u8],
32115    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32116        let avail_len = __input.len();
32117        let mut payload_buf = [0; Self::ENCODED_LEN];
32118        let mut buf = if avail_len < Self::ENCODED_LEN {
32119            payload_buf[0..avail_len].copy_from_slice(__input);
32120            Bytes::new(&payload_buf)
32121        } else {
32122            Bytes::new(__input)
32123        };
32124        let mut __struct = Self::default();
32125        __struct.time = buf.get_u64_le()?;
32126        __struct.lat = buf.get_i32_le()?;
32127        __struct.lon = buf.get_i32_le()?;
32128        __struct.alt = buf.get_i32_le()?;
32129        __struct.relative_alt = buf.get_i32_le()?;
32130        __struct.next_lat = buf.get_i32_le()?;
32131        __struct.next_lon = buf.get_i32_le()?;
32132        __struct.next_alt = buf.get_i32_le()?;
32133        __struct.vx = buf.get_i16_le()?;
32134        __struct.vy = buf.get_i16_le()?;
32135        __struct.vz = buf.get_i16_le()?;
32136        __struct.h_acc = buf.get_u16_le()?;
32137        __struct.v_acc = buf.get_u16_le()?;
32138        __struct.vel_acc = buf.get_u16_le()?;
32139        __struct.update_rate = buf.get_u16_le()?;
32140        for v in &mut __struct.uas_id {
32141            let val = buf.get_u8()?;
32142            *v = val;
32143        }
32144        let tmp = buf.get_u8()?;
32145        __struct.flight_state =
32146            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32147                enum_type: "UtmFlightState",
32148                value: tmp as u64,
32149            })?;
32150        let tmp = buf.get_u8()?;
32151        __struct.flags = UtmDataAvailFlags::from_bits(tmp as <UtmDataAvailFlags as Flags>::Bits)
32152            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
32153                flag_type: "UtmDataAvailFlags",
32154                value: tmp as u64,
32155            })?;
32156        Ok(__struct)
32157    }
32158    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32159        let mut __tmp = BytesMut::new(bytes);
32160        #[allow(clippy::absurd_extreme_comparisons)]
32161        #[allow(unused_comparisons)]
32162        if __tmp.remaining() < Self::ENCODED_LEN {
32163            panic!(
32164                "buffer is too small (need {} bytes, but got {})",
32165                Self::ENCODED_LEN,
32166                __tmp.remaining(),
32167            )
32168        }
32169        __tmp.put_u64_le(self.time);
32170        __tmp.put_i32_le(self.lat);
32171        __tmp.put_i32_le(self.lon);
32172        __tmp.put_i32_le(self.alt);
32173        __tmp.put_i32_le(self.relative_alt);
32174        __tmp.put_i32_le(self.next_lat);
32175        __tmp.put_i32_le(self.next_lon);
32176        __tmp.put_i32_le(self.next_alt);
32177        __tmp.put_i16_le(self.vx);
32178        __tmp.put_i16_le(self.vy);
32179        __tmp.put_i16_le(self.vz);
32180        __tmp.put_u16_le(self.h_acc);
32181        __tmp.put_u16_le(self.v_acc);
32182        __tmp.put_u16_le(self.vel_acc);
32183        __tmp.put_u16_le(self.update_rate);
32184        for val in &self.uas_id {
32185            __tmp.put_u8(*val);
32186        }
32187        __tmp.put_u8(self.flight_state as u8);
32188        __tmp.put_u8(self.flags.bits() as u8);
32189        if matches!(version, MavlinkVersion::V2) {
32190            let len = __tmp.len();
32191            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32192        } else {
32193            __tmp.len()
32194        }
32195    }
32196}
32197#[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
32198#[doc = ""]
32199#[doc = "ID: 248"]
32200#[derive(Debug, Clone, PartialEq)]
32201#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32202#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32203#[cfg_attr(feature = "ts", derive(TS))]
32204#[cfg_attr(feature = "ts", ts(export))]
32205pub struct V2_EXTENSION_DATA {
32206    #[doc = "A code that identifies the software component that understands this message (analogous to USB device classes or mime type strings). If this code is less than 32768, it is considered a 'registered' protocol extension and the corresponding entry should be added to <https://github.com/mavlink/mavlink/definition_files/extension_message_ids.xml>. Software creators can register blocks of message IDs as needed (useful for GCS specific metadata, etc...). Message_types greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
32207    pub message_type: u16,
32208    #[doc = "Network ID (0 for broadcast)"]
32209    pub target_network: u8,
32210    #[doc = "System ID (0 for broadcast)"]
32211    pub target_system: u8,
32212    #[doc = "Component ID (0 for broadcast)"]
32213    pub target_component: u8,
32214    #[doc = "Variable length payload. The length must be encoded in the payload as part of the message_type protocol, e.g. by including the length as payload data, or by terminating the payload data with a non-zero marker. This is required in order to reconstruct zero-terminated payloads that are (or otherwise would be) trimmed by MAVLink 2 empty-byte truncation. The entire content of the payload block is opaque unless you understand the encoding message_type. The particular encoding used can be extension specific and might not always be documented as part of the MAVLink specification."]
32215    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32216    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32217    pub payload: [u8; 249],
32218}
32219impl V2_EXTENSION_DATA {
32220    pub const ENCODED_LEN: usize = 254usize;
32221    pub const DEFAULT: Self = Self {
32222        message_type: 0_u16,
32223        target_network: 0_u8,
32224        target_system: 0_u8,
32225        target_component: 0_u8,
32226        payload: [0_u8; 249usize],
32227    };
32228    #[cfg(feature = "arbitrary")]
32229    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32230        use arbitrary::{Arbitrary, Unstructured};
32231        let mut buf = [0u8; 1024];
32232        rng.fill_bytes(&mut buf);
32233        let mut unstructured = Unstructured::new(&buf);
32234        Self::arbitrary(&mut unstructured).unwrap_or_default()
32235    }
32236}
32237impl Default for V2_EXTENSION_DATA {
32238    fn default() -> Self {
32239        Self::DEFAULT.clone()
32240    }
32241}
32242impl MessageData for V2_EXTENSION_DATA {
32243    type Message = MavMessage;
32244    const ID: u32 = 248u32;
32245    const NAME: &'static str = "V2_EXTENSION";
32246    const EXTRA_CRC: u8 = 8u8;
32247    const ENCODED_LEN: usize = 254usize;
32248    fn deser(
32249        _version: MavlinkVersion,
32250        __input: &[u8],
32251    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32252        let avail_len = __input.len();
32253        let mut payload_buf = [0; Self::ENCODED_LEN];
32254        let mut buf = if avail_len < Self::ENCODED_LEN {
32255            payload_buf[0..avail_len].copy_from_slice(__input);
32256            Bytes::new(&payload_buf)
32257        } else {
32258            Bytes::new(__input)
32259        };
32260        let mut __struct = Self::default();
32261        __struct.message_type = buf.get_u16_le()?;
32262        __struct.target_network = buf.get_u8()?;
32263        __struct.target_system = buf.get_u8()?;
32264        __struct.target_component = buf.get_u8()?;
32265        for v in &mut __struct.payload {
32266            let val = buf.get_u8()?;
32267            *v = val;
32268        }
32269        Ok(__struct)
32270    }
32271    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32272        let mut __tmp = BytesMut::new(bytes);
32273        #[allow(clippy::absurd_extreme_comparisons)]
32274        #[allow(unused_comparisons)]
32275        if __tmp.remaining() < Self::ENCODED_LEN {
32276            panic!(
32277                "buffer is too small (need {} bytes, but got {})",
32278                Self::ENCODED_LEN,
32279                __tmp.remaining(),
32280            )
32281        }
32282        __tmp.put_u16_le(self.message_type);
32283        __tmp.put_u8(self.target_network);
32284        __tmp.put_u8(self.target_system);
32285        __tmp.put_u8(self.target_component);
32286        for val in &self.payload {
32287            __tmp.put_u8(*val);
32288        }
32289        if matches!(version, MavlinkVersion::V2) {
32290            let len = __tmp.len();
32291            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32292        } else {
32293            __tmp.len()
32294        }
32295    }
32296}
32297#[doc = "Current limits for horizontal speed, vertical speed and yaw rate, as set by SET_VELOCITY_LIMITS."]
32298#[doc = ""]
32299#[doc = "ID: 355"]
32300#[derive(Debug, Clone, PartialEq)]
32301#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32302#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32303#[cfg_attr(feature = "ts", derive(TS))]
32304#[cfg_attr(feature = "ts", ts(export))]
32305pub struct VELOCITY_LIMITS_DATA {
32306    #[doc = "Limit for horizontal movement in MAV_FRAME_LOCAL_NED. NaN: No limit applied"]
32307    pub horizontal_speed_limit: f32,
32308    #[doc = "Limit for vertical movement in MAV_FRAME_LOCAL_NED. NaN: No limit applied"]
32309    pub vertical_speed_limit: f32,
32310    #[doc = "Limit for vehicle turn rate around its yaw axis. NaN: No limit applied"]
32311    pub yaw_rate_limit: f32,
32312}
32313impl VELOCITY_LIMITS_DATA {
32314    pub const ENCODED_LEN: usize = 12usize;
32315    pub const DEFAULT: Self = Self {
32316        horizontal_speed_limit: 0.0_f32,
32317        vertical_speed_limit: 0.0_f32,
32318        yaw_rate_limit: 0.0_f32,
32319    };
32320    #[cfg(feature = "arbitrary")]
32321    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32322        use arbitrary::{Arbitrary, Unstructured};
32323        let mut buf = [0u8; 1024];
32324        rng.fill_bytes(&mut buf);
32325        let mut unstructured = Unstructured::new(&buf);
32326        Self::arbitrary(&mut unstructured).unwrap_or_default()
32327    }
32328}
32329impl Default for VELOCITY_LIMITS_DATA {
32330    fn default() -> Self {
32331        Self::DEFAULT.clone()
32332    }
32333}
32334impl MessageData for VELOCITY_LIMITS_DATA {
32335    type Message = MavMessage;
32336    const ID: u32 = 355u32;
32337    const NAME: &'static str = "VELOCITY_LIMITS";
32338    const EXTRA_CRC: u8 = 6u8;
32339    const ENCODED_LEN: usize = 12usize;
32340    fn deser(
32341        _version: MavlinkVersion,
32342        __input: &[u8],
32343    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32344        let avail_len = __input.len();
32345        let mut payload_buf = [0; Self::ENCODED_LEN];
32346        let mut buf = if avail_len < Self::ENCODED_LEN {
32347            payload_buf[0..avail_len].copy_from_slice(__input);
32348            Bytes::new(&payload_buf)
32349        } else {
32350            Bytes::new(__input)
32351        };
32352        let mut __struct = Self::default();
32353        __struct.horizontal_speed_limit = buf.get_f32_le()?;
32354        __struct.vertical_speed_limit = buf.get_f32_le()?;
32355        __struct.yaw_rate_limit = buf.get_f32_le()?;
32356        Ok(__struct)
32357    }
32358    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32359        let mut __tmp = BytesMut::new(bytes);
32360        #[allow(clippy::absurd_extreme_comparisons)]
32361        #[allow(unused_comparisons)]
32362        if __tmp.remaining() < Self::ENCODED_LEN {
32363            panic!(
32364                "buffer is too small (need {} bytes, but got {})",
32365                Self::ENCODED_LEN,
32366                __tmp.remaining(),
32367            )
32368        }
32369        __tmp.put_f32_le(self.horizontal_speed_limit);
32370        __tmp.put_f32_le(self.vertical_speed_limit);
32371        __tmp.put_f32_le(self.yaw_rate_limit);
32372        if matches!(version, MavlinkVersion::V2) {
32373            let len = __tmp.len();
32374            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32375        } else {
32376            __tmp.len()
32377        }
32378    }
32379}
32380#[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
32381#[doc = ""]
32382#[doc = "ID: 74"]
32383#[derive(Debug, Clone, PartialEq)]
32384#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32385#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32386#[cfg_attr(feature = "ts", derive(TS))]
32387#[cfg_attr(feature = "ts", ts(export))]
32388pub struct VFR_HUD_DATA {
32389    #[doc = "Vehicle speed in form appropriate for vehicle type. For standard aircraft this is typically calibrated airspeed (CAS) or indicated airspeed (IAS) - either of which can be used by a pilot to estimate stall speed."]
32390    pub airspeed: f32,
32391    #[doc = "Current ground speed."]
32392    pub groundspeed: f32,
32393    #[doc = "Current altitude (MSL)."]
32394    pub alt: f32,
32395    #[doc = "Current climb rate."]
32396    pub climb: f32,
32397    #[doc = "Current heading in compass units (0-360, 0=north)."]
32398    pub heading: i16,
32399    #[doc = "Current throttle setting (0 to 100)."]
32400    pub throttle: u16,
32401}
32402impl VFR_HUD_DATA {
32403    pub const ENCODED_LEN: usize = 20usize;
32404    pub const DEFAULT: Self = Self {
32405        airspeed: 0.0_f32,
32406        groundspeed: 0.0_f32,
32407        alt: 0.0_f32,
32408        climb: 0.0_f32,
32409        heading: 0_i16,
32410        throttle: 0_u16,
32411    };
32412    #[cfg(feature = "arbitrary")]
32413    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32414        use arbitrary::{Arbitrary, Unstructured};
32415        let mut buf = [0u8; 1024];
32416        rng.fill_bytes(&mut buf);
32417        let mut unstructured = Unstructured::new(&buf);
32418        Self::arbitrary(&mut unstructured).unwrap_or_default()
32419    }
32420}
32421impl Default for VFR_HUD_DATA {
32422    fn default() -> Self {
32423        Self::DEFAULT.clone()
32424    }
32425}
32426impl MessageData for VFR_HUD_DATA {
32427    type Message = MavMessage;
32428    const ID: u32 = 74u32;
32429    const NAME: &'static str = "VFR_HUD";
32430    const EXTRA_CRC: u8 = 20u8;
32431    const ENCODED_LEN: usize = 20usize;
32432    fn deser(
32433        _version: MavlinkVersion,
32434        __input: &[u8],
32435    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32436        let avail_len = __input.len();
32437        let mut payload_buf = [0; Self::ENCODED_LEN];
32438        let mut buf = if avail_len < Self::ENCODED_LEN {
32439            payload_buf[0..avail_len].copy_from_slice(__input);
32440            Bytes::new(&payload_buf)
32441        } else {
32442            Bytes::new(__input)
32443        };
32444        let mut __struct = Self::default();
32445        __struct.airspeed = buf.get_f32_le()?;
32446        __struct.groundspeed = buf.get_f32_le()?;
32447        __struct.alt = buf.get_f32_le()?;
32448        __struct.climb = buf.get_f32_le()?;
32449        __struct.heading = buf.get_i16_le()?;
32450        __struct.throttle = buf.get_u16_le()?;
32451        Ok(__struct)
32452    }
32453    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32454        let mut __tmp = BytesMut::new(bytes);
32455        #[allow(clippy::absurd_extreme_comparisons)]
32456        #[allow(unused_comparisons)]
32457        if __tmp.remaining() < Self::ENCODED_LEN {
32458            panic!(
32459                "buffer is too small (need {} bytes, but got {})",
32460                Self::ENCODED_LEN,
32461                __tmp.remaining(),
32462            )
32463        }
32464        __tmp.put_f32_le(self.airspeed);
32465        __tmp.put_f32_le(self.groundspeed);
32466        __tmp.put_f32_le(self.alt);
32467        __tmp.put_f32_le(self.climb);
32468        __tmp.put_i16_le(self.heading);
32469        __tmp.put_u16_le(self.throttle);
32470        if matches!(version, MavlinkVersion::V2) {
32471            let len = __tmp.len();
32472            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32473        } else {
32474            __tmp.len()
32475        }
32476    }
32477}
32478#[doc = "Vibration levels and accelerometer clipping."]
32479#[doc = ""]
32480#[doc = "ID: 241"]
32481#[derive(Debug, Clone, PartialEq)]
32482#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32483#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32484#[cfg_attr(feature = "ts", derive(TS))]
32485#[cfg_attr(feature = "ts", ts(export))]
32486pub struct VIBRATION_DATA {
32487    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
32488    pub time_usec: u64,
32489    #[doc = "Vibration levels on X-axis"]
32490    pub vibration_x: f32,
32491    #[doc = "Vibration levels on Y-axis"]
32492    pub vibration_y: f32,
32493    #[doc = "Vibration levels on Z-axis"]
32494    pub vibration_z: f32,
32495    #[doc = "first accelerometer clipping count"]
32496    pub clipping_0: u32,
32497    #[doc = "second accelerometer clipping count"]
32498    pub clipping_1: u32,
32499    #[doc = "third accelerometer clipping count"]
32500    pub clipping_2: u32,
32501}
32502impl VIBRATION_DATA {
32503    pub const ENCODED_LEN: usize = 32usize;
32504    pub const DEFAULT: Self = Self {
32505        time_usec: 0_u64,
32506        vibration_x: 0.0_f32,
32507        vibration_y: 0.0_f32,
32508        vibration_z: 0.0_f32,
32509        clipping_0: 0_u32,
32510        clipping_1: 0_u32,
32511        clipping_2: 0_u32,
32512    };
32513    #[cfg(feature = "arbitrary")]
32514    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32515        use arbitrary::{Arbitrary, Unstructured};
32516        let mut buf = [0u8; 1024];
32517        rng.fill_bytes(&mut buf);
32518        let mut unstructured = Unstructured::new(&buf);
32519        Self::arbitrary(&mut unstructured).unwrap_or_default()
32520    }
32521}
32522impl Default for VIBRATION_DATA {
32523    fn default() -> Self {
32524        Self::DEFAULT.clone()
32525    }
32526}
32527impl MessageData for VIBRATION_DATA {
32528    type Message = MavMessage;
32529    const ID: u32 = 241u32;
32530    const NAME: &'static str = "VIBRATION";
32531    const EXTRA_CRC: u8 = 90u8;
32532    const ENCODED_LEN: usize = 32usize;
32533    fn deser(
32534        _version: MavlinkVersion,
32535        __input: &[u8],
32536    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32537        let avail_len = __input.len();
32538        let mut payload_buf = [0; Self::ENCODED_LEN];
32539        let mut buf = if avail_len < Self::ENCODED_LEN {
32540            payload_buf[0..avail_len].copy_from_slice(__input);
32541            Bytes::new(&payload_buf)
32542        } else {
32543            Bytes::new(__input)
32544        };
32545        let mut __struct = Self::default();
32546        __struct.time_usec = buf.get_u64_le()?;
32547        __struct.vibration_x = buf.get_f32_le()?;
32548        __struct.vibration_y = buf.get_f32_le()?;
32549        __struct.vibration_z = buf.get_f32_le()?;
32550        __struct.clipping_0 = buf.get_u32_le()?;
32551        __struct.clipping_1 = buf.get_u32_le()?;
32552        __struct.clipping_2 = buf.get_u32_le()?;
32553        Ok(__struct)
32554    }
32555    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32556        let mut __tmp = BytesMut::new(bytes);
32557        #[allow(clippy::absurd_extreme_comparisons)]
32558        #[allow(unused_comparisons)]
32559        if __tmp.remaining() < Self::ENCODED_LEN {
32560            panic!(
32561                "buffer is too small (need {} bytes, but got {})",
32562                Self::ENCODED_LEN,
32563                __tmp.remaining(),
32564            )
32565        }
32566        __tmp.put_u64_le(self.time_usec);
32567        __tmp.put_f32_le(self.vibration_x);
32568        __tmp.put_f32_le(self.vibration_y);
32569        __tmp.put_f32_le(self.vibration_z);
32570        __tmp.put_u32_le(self.clipping_0);
32571        __tmp.put_u32_le(self.clipping_1);
32572        __tmp.put_u32_le(self.clipping_2);
32573        if matches!(version, MavlinkVersion::V2) {
32574            let len = __tmp.len();
32575            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32576        } else {
32577            __tmp.len()
32578        }
32579    }
32580}
32581#[doc = "Global position estimate from a Vicon motion system source."]
32582#[doc = ""]
32583#[doc = "ID: 104"]
32584#[derive(Debug, Clone, PartialEq)]
32585#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32586#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32587#[cfg_attr(feature = "ts", derive(TS))]
32588#[cfg_attr(feature = "ts", ts(export))]
32589pub struct VICON_POSITION_ESTIMATE_DATA {
32590    #[doc = "Timestamp (UNIX time or time since system boot)"]
32591    pub usec: u64,
32592    #[doc = "Global X position"]
32593    pub x: f32,
32594    #[doc = "Global Y position"]
32595    pub y: f32,
32596    #[doc = "Global Z position"]
32597    pub z: f32,
32598    #[doc = "Roll angle"]
32599    pub roll: f32,
32600    #[doc = "Pitch angle"]
32601    pub pitch: f32,
32602    #[doc = "Yaw angle"]
32603    pub yaw: f32,
32604    #[doc = "Row-major representation of 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
32605    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
32606    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32607    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
32608    pub covariance: [f32; 21],
32609}
32610impl VICON_POSITION_ESTIMATE_DATA {
32611    pub const ENCODED_LEN: usize = 116usize;
32612    pub const DEFAULT: Self = Self {
32613        usec: 0_u64,
32614        x: 0.0_f32,
32615        y: 0.0_f32,
32616        z: 0.0_f32,
32617        roll: 0.0_f32,
32618        pitch: 0.0_f32,
32619        yaw: 0.0_f32,
32620        covariance: [0.0_f32; 21usize],
32621    };
32622    #[cfg(feature = "arbitrary")]
32623    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32624        use arbitrary::{Arbitrary, Unstructured};
32625        let mut buf = [0u8; 1024];
32626        rng.fill_bytes(&mut buf);
32627        let mut unstructured = Unstructured::new(&buf);
32628        Self::arbitrary(&mut unstructured).unwrap_or_default()
32629    }
32630}
32631impl Default for VICON_POSITION_ESTIMATE_DATA {
32632    fn default() -> Self {
32633        Self::DEFAULT.clone()
32634    }
32635}
32636impl MessageData for VICON_POSITION_ESTIMATE_DATA {
32637    type Message = MavMessage;
32638    const ID: u32 = 104u32;
32639    const NAME: &'static str = "VICON_POSITION_ESTIMATE";
32640    const EXTRA_CRC: u8 = 56u8;
32641    const ENCODED_LEN: usize = 116usize;
32642    fn deser(
32643        _version: MavlinkVersion,
32644        __input: &[u8],
32645    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32646        let avail_len = __input.len();
32647        let mut payload_buf = [0; Self::ENCODED_LEN];
32648        let mut buf = if avail_len < Self::ENCODED_LEN {
32649            payload_buf[0..avail_len].copy_from_slice(__input);
32650            Bytes::new(&payload_buf)
32651        } else {
32652            Bytes::new(__input)
32653        };
32654        let mut __struct = Self::default();
32655        __struct.usec = buf.get_u64_le()?;
32656        __struct.x = buf.get_f32_le()?;
32657        __struct.y = buf.get_f32_le()?;
32658        __struct.z = buf.get_f32_le()?;
32659        __struct.roll = buf.get_f32_le()?;
32660        __struct.pitch = buf.get_f32_le()?;
32661        __struct.yaw = buf.get_f32_le()?;
32662        for v in &mut __struct.covariance {
32663            let val = buf.get_f32_le()?;
32664            *v = val;
32665        }
32666        Ok(__struct)
32667    }
32668    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32669        let mut __tmp = BytesMut::new(bytes);
32670        #[allow(clippy::absurd_extreme_comparisons)]
32671        #[allow(unused_comparisons)]
32672        if __tmp.remaining() < Self::ENCODED_LEN {
32673            panic!(
32674                "buffer is too small (need {} bytes, but got {})",
32675                Self::ENCODED_LEN,
32676                __tmp.remaining(),
32677            )
32678        }
32679        __tmp.put_u64_le(self.usec);
32680        __tmp.put_f32_le(self.x);
32681        __tmp.put_f32_le(self.y);
32682        __tmp.put_f32_le(self.z);
32683        __tmp.put_f32_le(self.roll);
32684        __tmp.put_f32_le(self.pitch);
32685        __tmp.put_f32_le(self.yaw);
32686        if matches!(version, MavlinkVersion::V2) {
32687            for val in &self.covariance {
32688                __tmp.put_f32_le(*val);
32689            }
32690            let len = __tmp.len();
32691            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32692        } else {
32693            __tmp.len()
32694        }
32695    }
32696}
32697#[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
32698#[doc = ""]
32699#[doc = "ID: 269"]
32700#[derive(Debug, Clone, PartialEq)]
32701#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32702#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32703#[cfg_attr(feature = "ts", derive(TS))]
32704#[cfg_attr(feature = "ts", ts(export))]
32705pub struct VIDEO_STREAM_INFORMATION_DATA {
32706    #[doc = "Frame rate."]
32707    pub framerate: f32,
32708    #[doc = "Bit rate."]
32709    pub bitrate: u32,
32710    #[doc = "Bitmap of stream status flags."]
32711    pub flags: VideoStreamStatusFlags,
32712    #[doc = "Horizontal resolution."]
32713    pub resolution_h: u16,
32714    #[doc = "Vertical resolution."]
32715    pub resolution_v: u16,
32716    #[doc = "Video image rotation clockwise."]
32717    pub rotation: u16,
32718    #[doc = "Horizontal Field of view."]
32719    pub hfov: u16,
32720    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
32721    pub stream_id: u8,
32722    #[doc = "Number of streams available."]
32723    pub count: u8,
32724    #[doc = "Type of stream."]
32725    pub mavtype: VideoStreamType,
32726    #[doc = "Stream name."]
32727    #[cfg_attr(feature = "ts", ts(type = "string"))]
32728    pub name: CharArray<32>,
32729    #[doc = "Video stream URI (TCP or RTSP URI ground station should connect to) or port number (UDP port ground station should listen to)."]
32730    #[cfg_attr(feature = "ts", ts(type = "string"))]
32731    pub uri: CharArray<160>,
32732    #[doc = "Encoding of stream."]
32733    #[cfg_attr(feature = "serde", serde(default))]
32734    pub encoding: VideoStreamEncoding,
32735    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
32736    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
32737    pub camera_device_id: u8,
32738}
32739impl VIDEO_STREAM_INFORMATION_DATA {
32740    pub const ENCODED_LEN: usize = 215usize;
32741    pub const DEFAULT: Self = Self {
32742        framerate: 0.0_f32,
32743        bitrate: 0_u32,
32744        flags: VideoStreamStatusFlags::DEFAULT,
32745        resolution_h: 0_u16,
32746        resolution_v: 0_u16,
32747        rotation: 0_u16,
32748        hfov: 0_u16,
32749        stream_id: 0_u8,
32750        count: 0_u8,
32751        mavtype: VideoStreamType::DEFAULT,
32752        name: CharArray::new([0_u8; 32usize]),
32753        uri: CharArray::new([0_u8; 160usize]),
32754        encoding: VideoStreamEncoding::DEFAULT,
32755        camera_device_id: 0_u8,
32756    };
32757    #[cfg(feature = "arbitrary")]
32758    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32759        use arbitrary::{Arbitrary, Unstructured};
32760        let mut buf = [0u8; 1024];
32761        rng.fill_bytes(&mut buf);
32762        let mut unstructured = Unstructured::new(&buf);
32763        Self::arbitrary(&mut unstructured).unwrap_or_default()
32764    }
32765}
32766impl Default for VIDEO_STREAM_INFORMATION_DATA {
32767    fn default() -> Self {
32768        Self::DEFAULT.clone()
32769    }
32770}
32771impl MessageData for VIDEO_STREAM_INFORMATION_DATA {
32772    type Message = MavMessage;
32773    const ID: u32 = 269u32;
32774    const NAME: &'static str = "VIDEO_STREAM_INFORMATION";
32775    const EXTRA_CRC: u8 = 109u8;
32776    const ENCODED_LEN: usize = 215usize;
32777    fn deser(
32778        _version: MavlinkVersion,
32779        __input: &[u8],
32780    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32781        let avail_len = __input.len();
32782        let mut payload_buf = [0; Self::ENCODED_LEN];
32783        let mut buf = if avail_len < Self::ENCODED_LEN {
32784            payload_buf[0..avail_len].copy_from_slice(__input);
32785            Bytes::new(&payload_buf)
32786        } else {
32787            Bytes::new(__input)
32788        };
32789        let mut __struct = Self::default();
32790        __struct.framerate = buf.get_f32_le()?;
32791        __struct.bitrate = buf.get_u32_le()?;
32792        let tmp = buf.get_u16_le()?;
32793        __struct.flags =
32794            VideoStreamStatusFlags::from_bits(tmp as <VideoStreamStatusFlags as Flags>::Bits)
32795                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
32796                    flag_type: "VideoStreamStatusFlags",
32797                    value: tmp as u64,
32798                })?;
32799        __struct.resolution_h = buf.get_u16_le()?;
32800        __struct.resolution_v = buf.get_u16_le()?;
32801        __struct.rotation = buf.get_u16_le()?;
32802        __struct.hfov = buf.get_u16_le()?;
32803        __struct.stream_id = buf.get_u8()?;
32804        __struct.count = buf.get_u8()?;
32805        let tmp = buf.get_u8()?;
32806        __struct.mavtype =
32807            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32808                enum_type: "VideoStreamType",
32809                value: tmp as u64,
32810            })?;
32811        let mut tmp = [0_u8; 32usize];
32812        for v in &mut tmp {
32813            *v = buf.get_u8()?;
32814        }
32815        __struct.name = CharArray::new(tmp);
32816        let mut tmp = [0_u8; 160usize];
32817        for v in &mut tmp {
32818            *v = buf.get_u8()?;
32819        }
32820        __struct.uri = CharArray::new(tmp);
32821        let tmp = buf.get_u8()?;
32822        __struct.encoding =
32823            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32824                enum_type: "VideoStreamEncoding",
32825                value: tmp as u64,
32826            })?;
32827        __struct.camera_device_id = buf.get_u8()?;
32828        Ok(__struct)
32829    }
32830    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32831        let mut __tmp = BytesMut::new(bytes);
32832        #[allow(clippy::absurd_extreme_comparisons)]
32833        #[allow(unused_comparisons)]
32834        if __tmp.remaining() < Self::ENCODED_LEN {
32835            panic!(
32836                "buffer is too small (need {} bytes, but got {})",
32837                Self::ENCODED_LEN,
32838                __tmp.remaining(),
32839            )
32840        }
32841        __tmp.put_f32_le(self.framerate);
32842        __tmp.put_u32_le(self.bitrate);
32843        __tmp.put_u16_le(self.flags.bits() as u16);
32844        __tmp.put_u16_le(self.resolution_h);
32845        __tmp.put_u16_le(self.resolution_v);
32846        __tmp.put_u16_le(self.rotation);
32847        __tmp.put_u16_le(self.hfov);
32848        __tmp.put_u8(self.stream_id);
32849        __tmp.put_u8(self.count);
32850        __tmp.put_u8(self.mavtype as u8);
32851        for val in &self.name {
32852            __tmp.put_u8(*val);
32853        }
32854        for val in &self.uri {
32855            __tmp.put_u8(*val);
32856        }
32857        if matches!(version, MavlinkVersion::V2) {
32858            __tmp.put_u8(self.encoding as u8);
32859            __tmp.put_u8(self.camera_device_id);
32860            let len = __tmp.len();
32861            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32862        } else {
32863            __tmp.len()
32864        }
32865    }
32866}
32867#[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
32868#[doc = ""]
32869#[doc = "ID: 270"]
32870#[derive(Debug, Clone, PartialEq)]
32871#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32872#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32873#[cfg_attr(feature = "ts", derive(TS))]
32874#[cfg_attr(feature = "ts", ts(export))]
32875pub struct VIDEO_STREAM_STATUS_DATA {
32876    #[doc = "Frame rate"]
32877    pub framerate: f32,
32878    #[doc = "Bit rate"]
32879    pub bitrate: u32,
32880    #[doc = "Bitmap of stream status flags"]
32881    pub flags: VideoStreamStatusFlags,
32882    #[doc = "Horizontal resolution"]
32883    pub resolution_h: u16,
32884    #[doc = "Vertical resolution"]
32885    pub resolution_v: u16,
32886    #[doc = "Video image rotation clockwise"]
32887    pub rotation: u16,
32888    #[doc = "Horizontal Field of view"]
32889    pub hfov: u16,
32890    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
32891    pub stream_id: u8,
32892    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
32893    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
32894    pub camera_device_id: u8,
32895}
32896impl VIDEO_STREAM_STATUS_DATA {
32897    pub const ENCODED_LEN: usize = 20usize;
32898    pub const DEFAULT: Self = Self {
32899        framerate: 0.0_f32,
32900        bitrate: 0_u32,
32901        flags: VideoStreamStatusFlags::DEFAULT,
32902        resolution_h: 0_u16,
32903        resolution_v: 0_u16,
32904        rotation: 0_u16,
32905        hfov: 0_u16,
32906        stream_id: 0_u8,
32907        camera_device_id: 0_u8,
32908    };
32909    #[cfg(feature = "arbitrary")]
32910    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32911        use arbitrary::{Arbitrary, Unstructured};
32912        let mut buf = [0u8; 1024];
32913        rng.fill_bytes(&mut buf);
32914        let mut unstructured = Unstructured::new(&buf);
32915        Self::arbitrary(&mut unstructured).unwrap_or_default()
32916    }
32917}
32918impl Default for VIDEO_STREAM_STATUS_DATA {
32919    fn default() -> Self {
32920        Self::DEFAULT.clone()
32921    }
32922}
32923impl MessageData for VIDEO_STREAM_STATUS_DATA {
32924    type Message = MavMessage;
32925    const ID: u32 = 270u32;
32926    const NAME: &'static str = "VIDEO_STREAM_STATUS";
32927    const EXTRA_CRC: u8 = 59u8;
32928    const ENCODED_LEN: usize = 20usize;
32929    fn deser(
32930        _version: MavlinkVersion,
32931        __input: &[u8],
32932    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32933        let avail_len = __input.len();
32934        let mut payload_buf = [0; Self::ENCODED_LEN];
32935        let mut buf = if avail_len < Self::ENCODED_LEN {
32936            payload_buf[0..avail_len].copy_from_slice(__input);
32937            Bytes::new(&payload_buf)
32938        } else {
32939            Bytes::new(__input)
32940        };
32941        let mut __struct = Self::default();
32942        __struct.framerate = buf.get_f32_le()?;
32943        __struct.bitrate = buf.get_u32_le()?;
32944        let tmp = buf.get_u16_le()?;
32945        __struct.flags =
32946            VideoStreamStatusFlags::from_bits(tmp as <VideoStreamStatusFlags as Flags>::Bits)
32947                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
32948                    flag_type: "VideoStreamStatusFlags",
32949                    value: tmp as u64,
32950                })?;
32951        __struct.resolution_h = buf.get_u16_le()?;
32952        __struct.resolution_v = buf.get_u16_le()?;
32953        __struct.rotation = buf.get_u16_le()?;
32954        __struct.hfov = buf.get_u16_le()?;
32955        __struct.stream_id = buf.get_u8()?;
32956        __struct.camera_device_id = buf.get_u8()?;
32957        Ok(__struct)
32958    }
32959    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32960        let mut __tmp = BytesMut::new(bytes);
32961        #[allow(clippy::absurd_extreme_comparisons)]
32962        #[allow(unused_comparisons)]
32963        if __tmp.remaining() < Self::ENCODED_LEN {
32964            panic!(
32965                "buffer is too small (need {} bytes, but got {})",
32966                Self::ENCODED_LEN,
32967                __tmp.remaining(),
32968            )
32969        }
32970        __tmp.put_f32_le(self.framerate);
32971        __tmp.put_u32_le(self.bitrate);
32972        __tmp.put_u16_le(self.flags.bits() as u16);
32973        __tmp.put_u16_le(self.resolution_h);
32974        __tmp.put_u16_le(self.resolution_v);
32975        __tmp.put_u16_le(self.rotation);
32976        __tmp.put_u16_le(self.hfov);
32977        __tmp.put_u8(self.stream_id);
32978        if matches!(version, MavlinkVersion::V2) {
32979            __tmp.put_u8(self.camera_device_id);
32980            let len = __tmp.len();
32981            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32982        } else {
32983            __tmp.len()
32984        }
32985    }
32986}
32987#[doc = "Local position/attitude estimate from a vision source."]
32988#[doc = ""]
32989#[doc = "ID: 102"]
32990#[derive(Debug, Clone, PartialEq)]
32991#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32992#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32993#[cfg_attr(feature = "ts", derive(TS))]
32994#[cfg_attr(feature = "ts", ts(export))]
32995pub struct VISION_POSITION_ESTIMATE_DATA {
32996    #[doc = "Timestamp (UNIX time or time since system boot)"]
32997    pub usec: u64,
32998    #[doc = "Local X position"]
32999    pub x: f32,
33000    #[doc = "Local Y position"]
33001    pub y: f32,
33002    #[doc = "Local Z position"]
33003    pub z: f32,
33004    #[doc = "Roll angle"]
33005    pub roll: f32,
33006    #[doc = "Pitch angle"]
33007    pub pitch: f32,
33008    #[doc = "Yaw angle"]
33009    pub yaw: f32,
33010    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
33011    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
33012    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
33013    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
33014    pub covariance: [f32; 21],
33015    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
33016    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
33017    pub reset_counter: u8,
33018}
33019impl VISION_POSITION_ESTIMATE_DATA {
33020    pub const ENCODED_LEN: usize = 117usize;
33021    pub const DEFAULT: Self = Self {
33022        usec: 0_u64,
33023        x: 0.0_f32,
33024        y: 0.0_f32,
33025        z: 0.0_f32,
33026        roll: 0.0_f32,
33027        pitch: 0.0_f32,
33028        yaw: 0.0_f32,
33029        covariance: [0.0_f32; 21usize],
33030        reset_counter: 0_u8,
33031    };
33032    #[cfg(feature = "arbitrary")]
33033    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33034        use arbitrary::{Arbitrary, Unstructured};
33035        let mut buf = [0u8; 1024];
33036        rng.fill_bytes(&mut buf);
33037        let mut unstructured = Unstructured::new(&buf);
33038        Self::arbitrary(&mut unstructured).unwrap_or_default()
33039    }
33040}
33041impl Default for VISION_POSITION_ESTIMATE_DATA {
33042    fn default() -> Self {
33043        Self::DEFAULT.clone()
33044    }
33045}
33046impl MessageData for VISION_POSITION_ESTIMATE_DATA {
33047    type Message = MavMessage;
33048    const ID: u32 = 102u32;
33049    const NAME: &'static str = "VISION_POSITION_ESTIMATE";
33050    const EXTRA_CRC: u8 = 158u8;
33051    const ENCODED_LEN: usize = 117usize;
33052    fn deser(
33053        _version: MavlinkVersion,
33054        __input: &[u8],
33055    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33056        let avail_len = __input.len();
33057        let mut payload_buf = [0; Self::ENCODED_LEN];
33058        let mut buf = if avail_len < Self::ENCODED_LEN {
33059            payload_buf[0..avail_len].copy_from_slice(__input);
33060            Bytes::new(&payload_buf)
33061        } else {
33062            Bytes::new(__input)
33063        };
33064        let mut __struct = Self::default();
33065        __struct.usec = buf.get_u64_le()?;
33066        __struct.x = buf.get_f32_le()?;
33067        __struct.y = buf.get_f32_le()?;
33068        __struct.z = buf.get_f32_le()?;
33069        __struct.roll = buf.get_f32_le()?;
33070        __struct.pitch = buf.get_f32_le()?;
33071        __struct.yaw = buf.get_f32_le()?;
33072        for v in &mut __struct.covariance {
33073            let val = buf.get_f32_le()?;
33074            *v = val;
33075        }
33076        __struct.reset_counter = buf.get_u8()?;
33077        Ok(__struct)
33078    }
33079    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33080        let mut __tmp = BytesMut::new(bytes);
33081        #[allow(clippy::absurd_extreme_comparisons)]
33082        #[allow(unused_comparisons)]
33083        if __tmp.remaining() < Self::ENCODED_LEN {
33084            panic!(
33085                "buffer is too small (need {} bytes, but got {})",
33086                Self::ENCODED_LEN,
33087                __tmp.remaining(),
33088            )
33089        }
33090        __tmp.put_u64_le(self.usec);
33091        __tmp.put_f32_le(self.x);
33092        __tmp.put_f32_le(self.y);
33093        __tmp.put_f32_le(self.z);
33094        __tmp.put_f32_le(self.roll);
33095        __tmp.put_f32_le(self.pitch);
33096        __tmp.put_f32_le(self.yaw);
33097        if matches!(version, MavlinkVersion::V2) {
33098            for val in &self.covariance {
33099                __tmp.put_f32_le(*val);
33100            }
33101            __tmp.put_u8(self.reset_counter);
33102            let len = __tmp.len();
33103            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33104        } else {
33105            __tmp.len()
33106        }
33107    }
33108}
33109#[doc = "Speed estimate from a vision source."]
33110#[doc = ""]
33111#[doc = "ID: 103"]
33112#[derive(Debug, Clone, PartialEq)]
33113#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33114#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33115#[cfg_attr(feature = "ts", derive(TS))]
33116#[cfg_attr(feature = "ts", ts(export))]
33117pub struct VISION_SPEED_ESTIMATE_DATA {
33118    #[doc = "Timestamp (UNIX time or time since system boot)"]
33119    pub usec: u64,
33120    #[doc = "Global X speed"]
33121    pub x: f32,
33122    #[doc = "Global Y speed"]
33123    pub y: f32,
33124    #[doc = "Global Z speed"]
33125    pub z: f32,
33126    #[doc = "Row-major representation of 3x3 linear velocity covariance matrix (states: vx, vy, vz; 1st three entries - 1st row, etc.). If unknown, assign NaN value to first element in the array."]
33127    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
33128    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
33129    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
33130    pub covariance: [f32; 9],
33131    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
33132    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
33133    pub reset_counter: u8,
33134}
33135impl VISION_SPEED_ESTIMATE_DATA {
33136    pub const ENCODED_LEN: usize = 57usize;
33137    pub const DEFAULT: Self = Self {
33138        usec: 0_u64,
33139        x: 0.0_f32,
33140        y: 0.0_f32,
33141        z: 0.0_f32,
33142        covariance: [0.0_f32; 9usize],
33143        reset_counter: 0_u8,
33144    };
33145    #[cfg(feature = "arbitrary")]
33146    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33147        use arbitrary::{Arbitrary, Unstructured};
33148        let mut buf = [0u8; 1024];
33149        rng.fill_bytes(&mut buf);
33150        let mut unstructured = Unstructured::new(&buf);
33151        Self::arbitrary(&mut unstructured).unwrap_or_default()
33152    }
33153}
33154impl Default for VISION_SPEED_ESTIMATE_DATA {
33155    fn default() -> Self {
33156        Self::DEFAULT.clone()
33157    }
33158}
33159impl MessageData for VISION_SPEED_ESTIMATE_DATA {
33160    type Message = MavMessage;
33161    const ID: u32 = 103u32;
33162    const NAME: &'static str = "VISION_SPEED_ESTIMATE";
33163    const EXTRA_CRC: u8 = 208u8;
33164    const ENCODED_LEN: usize = 57usize;
33165    fn deser(
33166        _version: MavlinkVersion,
33167        __input: &[u8],
33168    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33169        let avail_len = __input.len();
33170        let mut payload_buf = [0; Self::ENCODED_LEN];
33171        let mut buf = if avail_len < Self::ENCODED_LEN {
33172            payload_buf[0..avail_len].copy_from_slice(__input);
33173            Bytes::new(&payload_buf)
33174        } else {
33175            Bytes::new(__input)
33176        };
33177        let mut __struct = Self::default();
33178        __struct.usec = buf.get_u64_le()?;
33179        __struct.x = buf.get_f32_le()?;
33180        __struct.y = buf.get_f32_le()?;
33181        __struct.z = buf.get_f32_le()?;
33182        for v in &mut __struct.covariance {
33183            let val = buf.get_f32_le()?;
33184            *v = val;
33185        }
33186        __struct.reset_counter = buf.get_u8()?;
33187        Ok(__struct)
33188    }
33189    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33190        let mut __tmp = BytesMut::new(bytes);
33191        #[allow(clippy::absurd_extreme_comparisons)]
33192        #[allow(unused_comparisons)]
33193        if __tmp.remaining() < Self::ENCODED_LEN {
33194            panic!(
33195                "buffer is too small (need {} bytes, but got {})",
33196                Self::ENCODED_LEN,
33197                __tmp.remaining(),
33198            )
33199        }
33200        __tmp.put_u64_le(self.usec);
33201        __tmp.put_f32_le(self.x);
33202        __tmp.put_f32_le(self.y);
33203        __tmp.put_f32_le(self.z);
33204        if matches!(version, MavlinkVersion::V2) {
33205            for val in &self.covariance {
33206                __tmp.put_f32_le(*val);
33207            }
33208            __tmp.put_u8(self.reset_counter);
33209            let len = __tmp.len();
33210            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33211        } else {
33212            __tmp.len()
33213        }
33214    }
33215}
33216#[doc = "Cumulative distance traveled for each reported wheel."]
33217#[doc = ""]
33218#[doc = "ID: 9000"]
33219#[derive(Debug, Clone, PartialEq)]
33220#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33221#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33222#[cfg_attr(feature = "ts", derive(TS))]
33223#[cfg_attr(feature = "ts", ts(export))]
33224pub struct WHEEL_DISTANCE_DATA {
33225    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
33226    pub time_usec: u64,
33227    #[doc = "Distance reported by individual wheel encoders. Forward rotations increase values, reverse rotations decrease them. Not all wheels will necessarily have wheel encoders; the mapping of encoders to wheel positions must be agreed/understood by the endpoints."]
33228    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
33229    #[cfg_attr(feature = "ts", ts(type = "Array<number>"))]
33230    pub distance: [f64; 16],
33231    #[doc = "Number of wheels reported."]
33232    pub count: u8,
33233}
33234impl WHEEL_DISTANCE_DATA {
33235    pub const ENCODED_LEN: usize = 137usize;
33236    pub const DEFAULT: Self = Self {
33237        time_usec: 0_u64,
33238        distance: [0.0_f64; 16usize],
33239        count: 0_u8,
33240    };
33241    #[cfg(feature = "arbitrary")]
33242    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33243        use arbitrary::{Arbitrary, Unstructured};
33244        let mut buf = [0u8; 1024];
33245        rng.fill_bytes(&mut buf);
33246        let mut unstructured = Unstructured::new(&buf);
33247        Self::arbitrary(&mut unstructured).unwrap_or_default()
33248    }
33249}
33250impl Default for WHEEL_DISTANCE_DATA {
33251    fn default() -> Self {
33252        Self::DEFAULT.clone()
33253    }
33254}
33255impl MessageData for WHEEL_DISTANCE_DATA {
33256    type Message = MavMessage;
33257    const ID: u32 = 9000u32;
33258    const NAME: &'static str = "WHEEL_DISTANCE";
33259    const EXTRA_CRC: u8 = 113u8;
33260    const ENCODED_LEN: usize = 137usize;
33261    fn deser(
33262        _version: MavlinkVersion,
33263        __input: &[u8],
33264    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33265        let avail_len = __input.len();
33266        let mut payload_buf = [0; Self::ENCODED_LEN];
33267        let mut buf = if avail_len < Self::ENCODED_LEN {
33268            payload_buf[0..avail_len].copy_from_slice(__input);
33269            Bytes::new(&payload_buf)
33270        } else {
33271            Bytes::new(__input)
33272        };
33273        let mut __struct = Self::default();
33274        __struct.time_usec = buf.get_u64_le()?;
33275        for v in &mut __struct.distance {
33276            let val = buf.get_f64_le()?;
33277            *v = val;
33278        }
33279        __struct.count = buf.get_u8()?;
33280        Ok(__struct)
33281    }
33282    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33283        let mut __tmp = BytesMut::new(bytes);
33284        #[allow(clippy::absurd_extreme_comparisons)]
33285        #[allow(unused_comparisons)]
33286        if __tmp.remaining() < Self::ENCODED_LEN {
33287            panic!(
33288                "buffer is too small (need {} bytes, but got {})",
33289                Self::ENCODED_LEN,
33290                __tmp.remaining(),
33291            )
33292        }
33293        __tmp.put_u64_le(self.time_usec);
33294        for val in &self.distance {
33295            __tmp.put_f64_le(*val);
33296        }
33297        __tmp.put_u8(self.count);
33298        if matches!(version, MavlinkVersion::V2) {
33299            let len = __tmp.len();
33300            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33301        } else {
33302            __tmp.len()
33303        }
33304    }
33305}
33306#[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
33307#[doc = ""]
33308#[doc = "ID: 299"]
33309#[derive(Debug, Clone, PartialEq)]
33310#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33311#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33312#[cfg_attr(feature = "ts", derive(TS))]
33313#[cfg_attr(feature = "ts", ts(export))]
33314pub struct WIFI_CONFIG_AP_DATA {
33315    #[doc = "Name of Wi-Fi network (SSID). Blank to leave it unchanged when setting. Current SSID when sent back as a response."]
33316    #[cfg_attr(feature = "ts", ts(type = "string"))]
33317    pub ssid: CharArray<32>,
33318    #[doc = "Password. Blank for an open AP. MD5 hash when message is sent back as a response."]
33319    #[cfg_attr(feature = "ts", ts(type = "string"))]
33320    pub password: CharArray<64>,
33321    #[doc = "WiFi Mode."]
33322    #[cfg_attr(feature = "serde", serde(default))]
33323    pub mode: WifiConfigApMode,
33324    #[doc = "Message acceptance response (sent back to GS)."]
33325    #[cfg_attr(feature = "serde", serde(default))]
33326    pub response: WifiConfigApResponse,
33327}
33328impl WIFI_CONFIG_AP_DATA {
33329    pub const ENCODED_LEN: usize = 98usize;
33330    pub const DEFAULT: Self = Self {
33331        ssid: CharArray::new([0_u8; 32usize]),
33332        password: CharArray::new([0_u8; 64usize]),
33333        mode: WifiConfigApMode::DEFAULT,
33334        response: WifiConfigApResponse::DEFAULT,
33335    };
33336    #[cfg(feature = "arbitrary")]
33337    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33338        use arbitrary::{Arbitrary, Unstructured};
33339        let mut buf = [0u8; 1024];
33340        rng.fill_bytes(&mut buf);
33341        let mut unstructured = Unstructured::new(&buf);
33342        Self::arbitrary(&mut unstructured).unwrap_or_default()
33343    }
33344}
33345impl Default for WIFI_CONFIG_AP_DATA {
33346    fn default() -> Self {
33347        Self::DEFAULT.clone()
33348    }
33349}
33350impl MessageData for WIFI_CONFIG_AP_DATA {
33351    type Message = MavMessage;
33352    const ID: u32 = 299u32;
33353    const NAME: &'static str = "WIFI_CONFIG_AP";
33354    const EXTRA_CRC: u8 = 19u8;
33355    const ENCODED_LEN: usize = 98usize;
33356    fn deser(
33357        _version: MavlinkVersion,
33358        __input: &[u8],
33359    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33360        let avail_len = __input.len();
33361        let mut payload_buf = [0; Self::ENCODED_LEN];
33362        let mut buf = if avail_len < Self::ENCODED_LEN {
33363            payload_buf[0..avail_len].copy_from_slice(__input);
33364            Bytes::new(&payload_buf)
33365        } else {
33366            Bytes::new(__input)
33367        };
33368        let mut __struct = Self::default();
33369        let mut tmp = [0_u8; 32usize];
33370        for v in &mut tmp {
33371            *v = buf.get_u8()?;
33372        }
33373        __struct.ssid = CharArray::new(tmp);
33374        let mut tmp = [0_u8; 64usize];
33375        for v in &mut tmp {
33376            *v = buf.get_u8()?;
33377        }
33378        __struct.password = CharArray::new(tmp);
33379        let tmp = buf.get_i8()?;
33380        __struct.mode =
33381            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
33382                enum_type: "WifiConfigApMode",
33383                value: tmp as u64,
33384            })?;
33385        let tmp = buf.get_i8()?;
33386        __struct.response =
33387            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
33388                enum_type: "WifiConfigApResponse",
33389                value: tmp as u64,
33390            })?;
33391        Ok(__struct)
33392    }
33393    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33394        let mut __tmp = BytesMut::new(bytes);
33395        #[allow(clippy::absurd_extreme_comparisons)]
33396        #[allow(unused_comparisons)]
33397        if __tmp.remaining() < Self::ENCODED_LEN {
33398            panic!(
33399                "buffer is too small (need {} bytes, but got {})",
33400                Self::ENCODED_LEN,
33401                __tmp.remaining(),
33402            )
33403        }
33404        for val in &self.ssid {
33405            __tmp.put_u8(*val);
33406        }
33407        for val in &self.password {
33408            __tmp.put_u8(*val);
33409        }
33410        if matches!(version, MavlinkVersion::V2) {
33411            __tmp.put_i8(self.mode as i8);
33412            __tmp.put_i8(self.response as i8);
33413            let len = __tmp.len();
33414            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33415        } else {
33416            __tmp.len()
33417        }
33418    }
33419}
33420#[doc = "Winch status."]
33421#[doc = ""]
33422#[doc = "ID: 9005"]
33423#[derive(Debug, Clone, PartialEq)]
33424#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33425#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33426#[cfg_attr(feature = "ts", derive(TS))]
33427#[cfg_attr(feature = "ts", ts(export))]
33428pub struct WINCH_STATUS_DATA {
33429    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
33430    pub time_usec: u64,
33431    #[doc = "Length of line released. NaN if unknown"]
33432    pub line_length: f32,
33433    #[doc = "Speed line is being released or retracted. Positive values if being released, negative values if being retracted, NaN if unknown"]
33434    pub speed: f32,
33435    #[doc = "Tension on the line. NaN if unknown"]
33436    pub tension: f32,
33437    #[doc = "Voltage of the battery supplying the winch. NaN if unknown"]
33438    pub voltage: f32,
33439    #[doc = "Current draw from the winch. NaN if unknown"]
33440    pub current: f32,
33441    #[doc = "Status flags"]
33442    pub status: MavWinchStatusFlag,
33443    #[doc = "Temperature of the motor. INT16_MAX if unknown"]
33444    pub temperature: i16,
33445}
33446impl WINCH_STATUS_DATA {
33447    pub const ENCODED_LEN: usize = 34usize;
33448    pub const DEFAULT: Self = Self {
33449        time_usec: 0_u64,
33450        line_length: 0.0_f32,
33451        speed: 0.0_f32,
33452        tension: 0.0_f32,
33453        voltage: 0.0_f32,
33454        current: 0.0_f32,
33455        status: MavWinchStatusFlag::DEFAULT,
33456        temperature: 0_i16,
33457    };
33458    #[cfg(feature = "arbitrary")]
33459    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33460        use arbitrary::{Arbitrary, Unstructured};
33461        let mut buf = [0u8; 1024];
33462        rng.fill_bytes(&mut buf);
33463        let mut unstructured = Unstructured::new(&buf);
33464        Self::arbitrary(&mut unstructured).unwrap_or_default()
33465    }
33466}
33467impl Default for WINCH_STATUS_DATA {
33468    fn default() -> Self {
33469        Self::DEFAULT.clone()
33470    }
33471}
33472impl MessageData for WINCH_STATUS_DATA {
33473    type Message = MavMessage;
33474    const ID: u32 = 9005u32;
33475    const NAME: &'static str = "WINCH_STATUS";
33476    const EXTRA_CRC: u8 = 117u8;
33477    const ENCODED_LEN: usize = 34usize;
33478    fn deser(
33479        _version: MavlinkVersion,
33480        __input: &[u8],
33481    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33482        let avail_len = __input.len();
33483        let mut payload_buf = [0; Self::ENCODED_LEN];
33484        let mut buf = if avail_len < Self::ENCODED_LEN {
33485            payload_buf[0..avail_len].copy_from_slice(__input);
33486            Bytes::new(&payload_buf)
33487        } else {
33488            Bytes::new(__input)
33489        };
33490        let mut __struct = Self::default();
33491        __struct.time_usec = buf.get_u64_le()?;
33492        __struct.line_length = buf.get_f32_le()?;
33493        __struct.speed = buf.get_f32_le()?;
33494        __struct.tension = buf.get_f32_le()?;
33495        __struct.voltage = buf.get_f32_le()?;
33496        __struct.current = buf.get_f32_le()?;
33497        let tmp = buf.get_u32_le()?;
33498        __struct.status = MavWinchStatusFlag::from_bits(tmp as <MavWinchStatusFlag as Flags>::Bits)
33499            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
33500                flag_type: "MavWinchStatusFlag",
33501                value: tmp as u64,
33502            })?;
33503        __struct.temperature = buf.get_i16_le()?;
33504        Ok(__struct)
33505    }
33506    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33507        let mut __tmp = BytesMut::new(bytes);
33508        #[allow(clippy::absurd_extreme_comparisons)]
33509        #[allow(unused_comparisons)]
33510        if __tmp.remaining() < Self::ENCODED_LEN {
33511            panic!(
33512                "buffer is too small (need {} bytes, but got {})",
33513                Self::ENCODED_LEN,
33514                __tmp.remaining(),
33515            )
33516        }
33517        __tmp.put_u64_le(self.time_usec);
33518        __tmp.put_f32_le(self.line_length);
33519        __tmp.put_f32_le(self.speed);
33520        __tmp.put_f32_le(self.tension);
33521        __tmp.put_f32_le(self.voltage);
33522        __tmp.put_f32_le(self.current);
33523        __tmp.put_u32_le(self.status.bits() as u32);
33524        __tmp.put_i16_le(self.temperature);
33525        if matches!(version, MavlinkVersion::V2) {
33526            let len = __tmp.len();
33527            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33528        } else {
33529            __tmp.len()
33530        }
33531    }
33532}
33533#[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
33534#[doc = ""]
33535#[doc = "ID: 231"]
33536#[derive(Debug, Clone, PartialEq)]
33537#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33538#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33539#[cfg_attr(feature = "ts", derive(TS))]
33540#[cfg_attr(feature = "ts", ts(export))]
33541pub struct WIND_COV_DATA {
33542    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
33543    pub time_usec: u64,
33544    #[doc = "Wind in North (NED) direction (NAN if unknown)"]
33545    pub wind_x: f32,
33546    #[doc = "Wind in East (NED) direction (NAN if unknown)"]
33547    pub wind_y: f32,
33548    #[doc = "Wind in down (NED) direction (NAN if unknown)"]
33549    pub wind_z: f32,
33550    #[doc = "Variability of wind in XY, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
33551    pub var_horiz: f32,
33552    #[doc = "Variability of wind in Z, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
33553    pub var_vert: f32,
33554    #[doc = "Altitude (MSL) that this measurement was taken at (NAN if unknown)"]
33555    pub wind_alt: f32,
33556    #[doc = "Horizontal speed 1-STD accuracy (0 if unknown)"]
33557    pub horiz_accuracy: f32,
33558    #[doc = "Vertical speed 1-STD accuracy (0 if unknown)"]
33559    pub vert_accuracy: f32,
33560}
33561impl WIND_COV_DATA {
33562    pub const ENCODED_LEN: usize = 40usize;
33563    pub const DEFAULT: Self = Self {
33564        time_usec: 0_u64,
33565        wind_x: 0.0_f32,
33566        wind_y: 0.0_f32,
33567        wind_z: 0.0_f32,
33568        var_horiz: 0.0_f32,
33569        var_vert: 0.0_f32,
33570        wind_alt: 0.0_f32,
33571        horiz_accuracy: 0.0_f32,
33572        vert_accuracy: 0.0_f32,
33573    };
33574    #[cfg(feature = "arbitrary")]
33575    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33576        use arbitrary::{Arbitrary, Unstructured};
33577        let mut buf = [0u8; 1024];
33578        rng.fill_bytes(&mut buf);
33579        let mut unstructured = Unstructured::new(&buf);
33580        Self::arbitrary(&mut unstructured).unwrap_or_default()
33581    }
33582}
33583impl Default for WIND_COV_DATA {
33584    fn default() -> Self {
33585        Self::DEFAULT.clone()
33586    }
33587}
33588impl MessageData for WIND_COV_DATA {
33589    type Message = MavMessage;
33590    const ID: u32 = 231u32;
33591    const NAME: &'static str = "WIND_COV";
33592    const EXTRA_CRC: u8 = 105u8;
33593    const ENCODED_LEN: usize = 40usize;
33594    fn deser(
33595        _version: MavlinkVersion,
33596        __input: &[u8],
33597    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33598        let avail_len = __input.len();
33599        let mut payload_buf = [0; Self::ENCODED_LEN];
33600        let mut buf = if avail_len < Self::ENCODED_LEN {
33601            payload_buf[0..avail_len].copy_from_slice(__input);
33602            Bytes::new(&payload_buf)
33603        } else {
33604            Bytes::new(__input)
33605        };
33606        let mut __struct = Self::default();
33607        __struct.time_usec = buf.get_u64_le()?;
33608        __struct.wind_x = buf.get_f32_le()?;
33609        __struct.wind_y = buf.get_f32_le()?;
33610        __struct.wind_z = buf.get_f32_le()?;
33611        __struct.var_horiz = buf.get_f32_le()?;
33612        __struct.var_vert = buf.get_f32_le()?;
33613        __struct.wind_alt = buf.get_f32_le()?;
33614        __struct.horiz_accuracy = buf.get_f32_le()?;
33615        __struct.vert_accuracy = buf.get_f32_le()?;
33616        Ok(__struct)
33617    }
33618    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33619        let mut __tmp = BytesMut::new(bytes);
33620        #[allow(clippy::absurd_extreme_comparisons)]
33621        #[allow(unused_comparisons)]
33622        if __tmp.remaining() < Self::ENCODED_LEN {
33623            panic!(
33624                "buffer is too small (need {} bytes, but got {})",
33625                Self::ENCODED_LEN,
33626                __tmp.remaining(),
33627            )
33628        }
33629        __tmp.put_u64_le(self.time_usec);
33630        __tmp.put_f32_le(self.wind_x);
33631        __tmp.put_f32_le(self.wind_y);
33632        __tmp.put_f32_le(self.wind_z);
33633        __tmp.put_f32_le(self.var_horiz);
33634        __tmp.put_f32_le(self.var_vert);
33635        __tmp.put_f32_le(self.wind_alt);
33636        __tmp.put_f32_le(self.horiz_accuracy);
33637        __tmp.put_f32_le(self.vert_accuracy);
33638        if matches!(version, MavlinkVersion::V2) {
33639            let len = __tmp.len();
33640            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33641        } else {
33642            __tmp.len()
33643        }
33644    }
33645}
33646#[derive(Clone, PartialEq, Debug)]
33647#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33648#[cfg_attr(feature = "serde", serde(tag = "type"))]
33649#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33650#[cfg_attr(feature = "ts", derive(TS))]
33651#[cfg_attr(feature = "ts", ts(export))]
33652#[repr(u32)]
33653pub enum MavMessage {
33654    #[doc = "Set the vehicle attitude and body angular rates."]
33655    #[doc = ""]
33656    #[doc = "ID: 140"]
33657    ACTUATOR_CONTROL_TARGET(ACTUATOR_CONTROL_TARGET_DATA),
33658    #[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
33659    #[doc = ""]
33660    #[doc = "ID: 375"]
33661    ACTUATOR_OUTPUT_STATUS(ACTUATOR_OUTPUT_STATUS_DATA),
33662    #[doc = "The location and information of an ADSB vehicle."]
33663    #[doc = ""]
33664    #[doc = "ID: 246"]
33665    ADSB_VEHICLE(ADSB_VEHICLE_DATA),
33666    #[doc = "Airspeed information from a sensor."]
33667    #[doc = ""]
33668    #[doc = "ID: 295"]
33669    AIRSPEED(AIRSPEED_DATA),
33670    #[doc = "The location and information of an AIS vessel."]
33671    #[doc = ""]
33672    #[doc = "ID: 301"]
33673    AIS_VESSEL(AIS_VESSEL_DATA),
33674    #[doc = "The current system altitude."]
33675    #[doc = ""]
33676    #[doc = "ID: 141"]
33677    ALTITUDE(ALTITUDE_DATA),
33678    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
33679    #[doc = ""]
33680    #[doc = "ID: 30"]
33681    ATTITUDE(ATTITUDE_DATA),
33682    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
33683    #[doc = ""]
33684    #[doc = "ID: 31"]
33685    ATTITUDE_QUATERNION(ATTITUDE_QUATERNION_DATA),
33686    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
33687    #[doc = ""]
33688    #[doc = "ID: 61"]
33689    ATTITUDE_QUATERNION_COV(ATTITUDE_QUATERNION_COV_DATA),
33690    #[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
33691    #[doc = ""]
33692    #[doc = "ID: 83"]
33693    ATTITUDE_TARGET(ATTITUDE_TARGET_DATA),
33694    #[doc = "Motion capture attitude and position."]
33695    #[doc = ""]
33696    #[doc = "ID: 138"]
33697    ATT_POS_MOCAP(ATT_POS_MOCAP_DATA),
33698    #[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
33699    #[doc = ""]
33700    #[doc = "ID: 7"]
33701    AUTH_KEY(AUTH_KEY_DATA),
33702    #[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
33703    #[doc = ""]
33704    #[doc = "ID: 286"]
33705    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA),
33706    #[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
33707    #[doc = ""]
33708    #[doc = "ID: 148"]
33709    AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA),
33710    #[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
33711    #[doc = ""]
33712    #[doc = "ID: 435"]
33713    AVAILABLE_MODES(AVAILABLE_MODES_DATA),
33714    #[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
33715    #[doc = ""]
33716    #[doc = "ID: 437"]
33717    AVAILABLE_MODES_MONITOR(AVAILABLE_MODES_MONITOR_DATA),
33718    #[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
33719    #[doc = ""]
33720    #[doc = "ID: 372"]
33721    BATTERY_INFO(BATTERY_INFO_DATA),
33722    #[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
33723    #[doc = ""]
33724    #[doc = "ID: 147"]
33725    BATTERY_STATUS(BATTERY_STATUS_DATA),
33726    #[doc = "Battery dynamic information.         This should be streamed (nominally at 1Hz).         Static/invariant battery information is sent in BATTERY_INFO.         Note that smart batteries should set the MAV_BATTERY_STATUS_FLAGS_CAPACITY_RELATIVE_TO_FULL bit to indicate that supplied capacity values are relative to a battery that is known to be full.         Power monitors would not set this bit, indicating that capacity_consumed is relative to drone power-on, and that other values are estimated based on the assumption that the battery was full on power-on."]
33727    #[doc = ""]
33728    #[doc = "ID: 369"]
33729    BATTERY_STATUS_V2(BATTERY_STATUS_V2_DATA),
33730    #[doc = "Report button state change."]
33731    #[doc = ""]
33732    #[doc = "ID: 257"]
33733    BUTTON_CHANGE(BUTTON_CHANGE_DATA),
33734    #[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
33735    #[doc = ""]
33736    #[doc = "ID: 262"]
33737    CAMERA_CAPTURE_STATUS(CAMERA_CAPTURE_STATUS_DATA),
33738    #[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
33739    #[doc = ""]
33740    #[doc = "ID: 271"]
33741    CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA),
33742    #[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
33743    #[doc = ""]
33744    #[doc = "ID: 263"]
33745    CAMERA_IMAGE_CAPTURED(CAMERA_IMAGE_CAPTURED_DATA),
33746    #[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
33747    #[doc = ""]
33748    #[doc = "ID: 259"]
33749    CAMERA_INFORMATION(CAMERA_INFORMATION_DATA),
33750    #[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
33751    #[doc = ""]
33752    #[doc = "ID: 260"]
33753    CAMERA_SETTINGS(CAMERA_SETTINGS_DATA),
33754    #[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
33755    #[doc = ""]
33756    #[doc = "ID: 277"]
33757    CAMERA_THERMAL_RANGE(CAMERA_THERMAL_RANGE_DATA),
33758    #[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
33759    #[doc = ""]
33760    #[doc = "ID: 276"]
33761    CAMERA_TRACKING_GEO_STATUS(CAMERA_TRACKING_GEO_STATUS_DATA),
33762    #[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
33763    #[doc = ""]
33764    #[doc = "ID: 275"]
33765    CAMERA_TRACKING_IMAGE_STATUS(CAMERA_TRACKING_IMAGE_STATUS_DATA),
33766    #[doc = "Camera-IMU triggering and synchronisation message."]
33767    #[doc = ""]
33768    #[doc = "ID: 112"]
33769    CAMERA_TRIGGER(CAMERA_TRIGGER_DATA),
33770    #[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
33771    #[doc = ""]
33772    #[doc = "ID: 387"]
33773    CANFD_FRAME(CANFD_FRAME_DATA),
33774    #[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
33775    #[doc = ""]
33776    #[doc = "ID: 388"]
33777    CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA),
33778    #[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
33779    #[doc = ""]
33780    #[doc = "ID: 386"]
33781    CAN_FRAME(CAN_FRAME_DATA),
33782    #[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
33783    #[doc = ""]
33784    #[doc = "ID: 336"]
33785    CELLULAR_CONFIG(CELLULAR_CONFIG_DATA),
33786    #[doc = "Report current used cellular network status."]
33787    #[doc = ""]
33788    #[doc = "ID: 334"]
33789    CELLULAR_STATUS(CELLULAR_STATUS_DATA),
33790    #[doc = "Request to control this MAV."]
33791    #[doc = ""]
33792    #[doc = "ID: 5"]
33793    CHANGE_OPERATOR_CONTROL(CHANGE_OPERATOR_CONTROL_DATA),
33794    #[doc = "Accept / deny control of this MAV."]
33795    #[doc = ""]
33796    #[doc = "ID: 6"]
33797    CHANGE_OPERATOR_CONTROL_ACK(CHANGE_OPERATOR_CONTROL_ACK_DATA),
33798    #[doc = "Information about a potential collision."]
33799    #[doc = ""]
33800    #[doc = "ID: 247"]
33801    COLLISION(COLLISION_DATA),
33802    #[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
33803    #[doc = ""]
33804    #[doc = "ID: 77"]
33805    COMMAND_ACK(COMMAND_ACK_DATA),
33806    #[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
33807    #[doc = ""]
33808    #[doc = "ID: 80"]
33809    COMMAND_CANCEL(COMMAND_CANCEL_DATA),
33810    #[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
33811    #[doc = ""]
33812    #[doc = "ID: 75"]
33813    COMMAND_INT(COMMAND_INT_DATA),
33814    #[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
33815    #[doc = ""]
33816    #[doc = "ID: 76"]
33817    COMMAND_LONG(COMMAND_LONG_DATA),
33818    #[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
33819    #[doc = ""]
33820    #[doc = "ID: 395"]
33821    #[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
33822    COMPONENT_INFORMATION(COMPONENT_INFORMATION_DATA),
33823    #[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
33824    #[doc = ""]
33825    #[doc = "ID: 396"]
33826    COMPONENT_INFORMATION_BASIC(COMPONENT_INFORMATION_BASIC_DATA),
33827    #[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
33828    #[doc = ""]
33829    #[doc = "ID: 397"]
33830    COMPONENT_METADATA(COMPONENT_METADATA_DATA),
33831    #[doc = "Information about GCS in control of this MAV. This should be broadcast at low rate (nominally 1 Hz) and emitted when ownership or takeover status change. Control over MAV is requested using MAV_CMD_REQUEST_OPERATOR_CONTROL."]
33832    #[doc = ""]
33833    #[doc = "ID: 512"]
33834    CONTROL_STATUS(CONTROL_STATUS_DATA),
33835    #[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
33836    #[doc = ""]
33837    #[doc = "ID: 146"]
33838    CONTROL_SYSTEM_STATE(CONTROL_SYSTEM_STATE_DATA),
33839    #[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
33840    #[doc = ""]
33841    #[doc = "ID: 411"]
33842    CURRENT_EVENT_SEQUENCE(CURRENT_EVENT_SEQUENCE_DATA),
33843    #[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
33844    #[doc = ""]
33845    #[doc = "ID: 436"]
33846    CURRENT_MODE(CURRENT_MODE_DATA),
33847    #[doc = "Data stream status information."]
33848    #[doc = ""]
33849    #[doc = "ID: 67"]
33850    #[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
33851    DATA_STREAM(DATA_STREAM_DATA),
33852    #[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
33853    #[doc = ""]
33854    #[doc = "ID: 130"]
33855    DATA_TRANSMISSION_HANDSHAKE(DATA_TRANSMISSION_HANDSHAKE_DATA),
33856    #[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
33857    #[doc = ""]
33858    #[doc = "ID: 254"]
33859    DEBUG(DEBUG_DATA),
33860    #[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
33861    #[doc = ""]
33862    #[doc = "ID: 350"]
33863    DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA),
33864    #[doc = "To debug something using a named 3D vector."]
33865    #[doc = ""]
33866    #[doc = "ID: 250"]
33867    DEBUG_VECT(DEBUG_VECT_DATA),
33868    #[doc = "Distance sensor information for an onboard rangefinder."]
33869    #[doc = ""]
33870    #[doc = "ID: 132"]
33871    DISTANCE_SENSOR(DISTANCE_SENSOR_DATA),
33872    #[doc = "EFI status output."]
33873    #[doc = ""]
33874    #[doc = "ID: 225"]
33875    EFI_STATUS(EFI_STATUS_DATA),
33876    #[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
33877    #[doc = ""]
33878    #[doc = "ID: 131"]
33879    ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA),
33880    #[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
33881    #[doc = ""]
33882    #[doc = "ID: 290"]
33883    ESC_INFO(ESC_INFO_DATA),
33884    #[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
33885    #[doc = ""]
33886    #[doc = "ID: 291"]
33887    ESC_STATUS(ESC_STATUS_DATA),
33888    #[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
33889    #[doc = ""]
33890    #[doc = "ID: 230"]
33891    ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA),
33892    #[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
33893    #[doc = ""]
33894    #[doc = "ID: 410"]
33895    EVENT(EVENT_DATA),
33896    #[doc = "Provides state for additional features."]
33897    #[doc = ""]
33898    #[doc = "ID: 245"]
33899    EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA),
33900    #[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
33901    #[doc = ""]
33902    #[doc = "ID: 162"]
33903    FENCE_STATUS(FENCE_STATUS_DATA),
33904    #[doc = "Vehicle status report that is sent out while figure eight execution is in progress (see MAV_CMD_DO_FIGURE_EIGHT).         This may typically send at low rates: of the order of 2Hz."]
33905    #[doc = ""]
33906    #[doc = "ID: 361"]
33907    FIGURE_EIGHT_EXECUTION_STATUS(FIGURE_EIGHT_EXECUTION_STATUS_DATA),
33908    #[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
33909    #[doc = ""]
33910    #[doc = "ID: 110"]
33911    FILE_TRANSFER_PROTOCOL(FILE_TRANSFER_PROTOCOL_DATA),
33912    #[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
33913    #[doc = ""]
33914    #[doc = "ID: 264"]
33915    FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA),
33916    #[doc = "Current motion information from a designated system."]
33917    #[doc = ""]
33918    #[doc = "ID: 144"]
33919    FOLLOW_TARGET(FOLLOW_TARGET_DATA),
33920    #[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
33921    #[doc = ""]
33922    #[doc = "ID: 371"]
33923    FUEL_STATUS(FUEL_STATUS_DATA),
33924    #[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
33925    #[doc = ""]
33926    #[doc = "ID: 373"]
33927    GENERATOR_STATUS(GENERATOR_STATUS_DATA),
33928    #[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
33929    #[doc = ""]
33930    #[doc = "ID: 285"]
33931    GIMBAL_DEVICE_ATTITUDE_STATUS(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA),
33932    #[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
33933    #[doc = ""]
33934    #[doc = "ID: 283"]
33935    GIMBAL_DEVICE_INFORMATION(GIMBAL_DEVICE_INFORMATION_DATA),
33936    #[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
33937    #[doc = ""]
33938    #[doc = "ID: 284"]
33939    GIMBAL_DEVICE_SET_ATTITUDE(GIMBAL_DEVICE_SET_ATTITUDE_DATA),
33940    #[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
33941    #[doc = ""]
33942    #[doc = "ID: 280"]
33943    GIMBAL_MANAGER_INFORMATION(GIMBAL_MANAGER_INFORMATION_DATA),
33944    #[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
33945    #[doc = ""]
33946    #[doc = "ID: 282"]
33947    GIMBAL_MANAGER_SET_ATTITUDE(GIMBAL_MANAGER_SET_ATTITUDE_DATA),
33948    #[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
33949    #[doc = ""]
33950    #[doc = "ID: 288"]
33951    GIMBAL_MANAGER_SET_MANUAL_CONTROL(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA),
33952    #[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
33953    #[doc = ""]
33954    #[doc = "ID: 287"]
33955    GIMBAL_MANAGER_SET_PITCHYAW(GIMBAL_MANAGER_SET_PITCHYAW_DATA),
33956    #[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
33957    #[doc = ""]
33958    #[doc = "ID: 281"]
33959    GIMBAL_MANAGER_STATUS(GIMBAL_MANAGER_STATUS_DATA),
33960    #[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
33961    #[doc = ""]
33962    #[doc = "ID: 33"]
33963    GLOBAL_POSITION_INT(GLOBAL_POSITION_INT_DATA),
33964    #[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
33965    #[doc = ""]
33966    #[doc = "ID: 63"]
33967    GLOBAL_POSITION_INT_COV(GLOBAL_POSITION_INT_COV_DATA),
33968    #[doc = "Global position/attitude estimate from a vision source."]
33969    #[doc = ""]
33970    #[doc = "ID: 101"]
33971    GLOBAL_VISION_POSITION_ESTIMATE(GLOBAL_VISION_POSITION_ESTIMATE_DATA),
33972    #[doc = "Information about key components of GNSS receivers, like signal authentication, interference and system errors."]
33973    #[doc = ""]
33974    #[doc = "ID: 441"]
33975    GNSS_INTEGRITY(GNSS_INTEGRITY_DATA),
33976    #[doc = "Second GPS data."]
33977    #[doc = ""]
33978    #[doc = "ID: 124"]
33979    GPS2_RAW(GPS2_RAW_DATA),
33980    #[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
33981    #[doc = ""]
33982    #[doc = "ID: 128"]
33983    GPS2_RTK(GPS2_RTK_DATA),
33984    #[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
33985    #[doc = ""]
33986    #[doc = "ID: 49"]
33987    GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA),
33988    #[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
33989    #[doc = ""]
33990    #[doc = "ID: 123"]
33991    #[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
33992    GPS_INJECT_DATA(GPS_INJECT_DATA_DATA),
33993    #[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
33994    #[doc = ""]
33995    #[doc = "ID: 232"]
33996    GPS_INPUT(GPS_INPUT_DATA),
33997    #[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
33998    #[doc = ""]
33999    #[doc = "ID: 24"]
34000    GPS_RAW_INT(GPS_RAW_INT_DATA),
34001    #[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
34002    #[doc = ""]
34003    #[doc = "ID: 233"]
34004    GPS_RTCM_DATA(GPS_RTCM_DATA_DATA),
34005    #[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
34006    #[doc = ""]
34007    #[doc = "ID: 127"]
34008    GPS_RTK(GPS_RTK_DATA),
34009    #[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
34010    #[doc = ""]
34011    #[doc = "ID: 25"]
34012    GPS_STATUS(GPS_STATUS_DATA),
34013    #[doc = "Emitted during mission execution when control reaches MAV_CMD_GROUP_END."]
34014    #[doc = ""]
34015    #[doc = "ID: 415"]
34016    GROUP_END(GROUP_END_DATA),
34017    #[doc = "Emitted during mission execution when control reaches MAV_CMD_GROUP_START."]
34018    #[doc = ""]
34019    #[doc = "ID: 414"]
34020    GROUP_START(GROUP_START_DATA),
34021    #[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
34022    #[doc = ""]
34023    #[doc = "ID: 0"]
34024    HEARTBEAT(HEARTBEAT_DATA),
34025    #[doc = "The IMU readings in SI units in NED body frame."]
34026    #[doc = ""]
34027    #[doc = "ID: 105"]
34028    HIGHRES_IMU(HIGHRES_IMU_DATA),
34029    #[doc = "Message appropriate for high latency connections like Iridium."]
34030    #[doc = ""]
34031    #[doc = "ID: 234"]
34032    #[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
34033    HIGH_LATENCY(HIGH_LATENCY_DATA),
34034    #[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
34035    #[doc = ""]
34036    #[doc = "ID: 235"]
34037    HIGH_LATENCY2(HIGH_LATENCY2_DATA),
34038    #[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
34039    #[doc = ""]
34040    #[doc = "ID: 93"]
34041    HIL_ACTUATOR_CONTROLS(HIL_ACTUATOR_CONTROLS_DATA),
34042    #[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
34043    #[doc = ""]
34044    #[doc = "ID: 91"]
34045    HIL_CONTROLS(HIL_CONTROLS_DATA),
34046    #[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
34047    #[doc = ""]
34048    #[doc = "ID: 113"]
34049    HIL_GPS(HIL_GPS_DATA),
34050    #[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
34051    #[doc = ""]
34052    #[doc = "ID: 114"]
34053    HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA),
34054    #[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
34055    #[doc = ""]
34056    #[doc = "ID: 92"]
34057    HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA),
34058    #[doc = "The IMU readings in SI units in NED body frame."]
34059    #[doc = ""]
34060    #[doc = "ID: 107"]
34061    HIL_SENSOR(HIL_SENSOR_DATA),
34062    #[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
34063    #[doc = ""]
34064    #[doc = "ID: 90"]
34065    #[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
34066    HIL_STATE(HIL_STATE_DATA),
34067    #[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
34068    #[doc = ""]
34069    #[doc = "ID: 115"]
34070    HIL_STATE_QUATERNION(HIL_STATE_QUATERNION_DATA),
34071    #[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
34072    #[doc = ""]
34073    #[doc = "ID: 242"]
34074    HOME_POSITION(HOME_POSITION_DATA),
34075    #[doc = "Temperature and humidity from hygrometer."]
34076    #[doc = ""]
34077    #[doc = "ID: 12920"]
34078    HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA),
34079    #[doc = "Illuminator status."]
34080    #[doc = ""]
34081    #[doc = "ID: 440"]
34082    ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA),
34083    #[doc = "Status of the Iridium SBD link."]
34084    #[doc = ""]
34085    #[doc = "ID: 335"]
34086    ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA),
34087    #[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
34088    #[doc = ""]
34089    #[doc = "ID: 149"]
34090    LANDING_TARGET(LANDING_TARGET_DATA),
34091    #[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
34092    #[doc = ""]
34093    #[doc = "ID: 8"]
34094    LINK_NODE_STATUS(LINK_NODE_STATUS_DATA),
34095    #[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
34096    #[doc = ""]
34097    #[doc = "ID: 32"]
34098    LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA),
34099    #[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
34100    #[doc = ""]
34101    #[doc = "ID: 64"]
34102    LOCAL_POSITION_NED_COV(LOCAL_POSITION_NED_COV_DATA),
34103    #[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
34104    #[doc = ""]
34105    #[doc = "ID: 89"]
34106    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA),
34107    #[doc = "An ack for a LOGGING_DATA_ACKED message."]
34108    #[doc = ""]
34109    #[doc = "ID: 268"]
34110    LOGGING_ACK(LOGGING_ACK_DATA),
34111    #[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
34112    #[doc = ""]
34113    #[doc = "ID: 266"]
34114    LOGGING_DATA(LOGGING_DATA_DATA),
34115    #[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
34116    #[doc = ""]
34117    #[doc = "ID: 267"]
34118    LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA),
34119    #[doc = "Reply to LOG_REQUEST_DATA."]
34120    #[doc = ""]
34121    #[doc = "ID: 120"]
34122    LOG_DATA(LOG_DATA_DATA),
34123    #[doc = "Reply to LOG_REQUEST_LIST."]
34124    #[doc = ""]
34125    #[doc = "ID: 118"]
34126    LOG_ENTRY(LOG_ENTRY_DATA),
34127    #[doc = "Erase all logs."]
34128    #[doc = ""]
34129    #[doc = "ID: 121"]
34130    LOG_ERASE(LOG_ERASE_DATA),
34131    #[doc = "Request a chunk of a log."]
34132    #[doc = ""]
34133    #[doc = "ID: 119"]
34134    LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA),
34135    #[doc = "Stop log transfer and resume normal logging."]
34136    #[doc = ""]
34137    #[doc = "ID: 122"]
34138    LOG_REQUEST_END(LOG_REQUEST_END_DATA),
34139    #[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
34140    #[doc = ""]
34141    #[doc = "ID: 117"]
34142    LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA),
34143    #[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
34144    #[doc = ""]
34145    #[doc = "ID: 192"]
34146    MAG_CAL_REPORT(MAG_CAL_REPORT_DATA),
34147    #[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
34148    #[doc = ""]
34149    #[doc = "ID: 69"]
34150    MANUAL_CONTROL(MANUAL_CONTROL_DATA),
34151    #[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
34152    #[doc = ""]
34153    #[doc = "ID: 81"]
34154    MANUAL_SETPOINT(MANUAL_SETPOINT_DATA),
34155    #[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
34156    #[doc = ""]
34157    #[doc = "ID: 249"]
34158    MEMORY_VECT(MEMORY_VECT_DATA),
34159    #[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
34160    #[doc = ""]
34161    #[doc = "ID: 244"]
34162    MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA),
34163    #[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
34164    #[doc = ""]
34165    #[doc = "ID: 47"]
34166    MISSION_ACK(MISSION_ACK_DATA),
34167    #[doc = "Delete all mission items at once."]
34168    #[doc = ""]
34169    #[doc = "ID: 45"]
34170    MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA),
34171    #[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
34172    #[doc = ""]
34173    #[doc = "ID: 44"]
34174    MISSION_COUNT(MISSION_COUNT_DATA),
34175    #[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
34176    #[doc = ""]
34177    #[doc = "ID: 42"]
34178    MISSION_CURRENT(MISSION_CURRENT_DATA),
34179    #[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
34180    #[doc = ""]
34181    #[doc = "ID: 39"]
34182    #[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
34183    MISSION_ITEM(MISSION_ITEM_DATA),
34184    #[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
34185    #[doc = ""]
34186    #[doc = "ID: 73"]
34187    MISSION_ITEM_INT(MISSION_ITEM_INT_DATA),
34188    #[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
34189    #[doc = ""]
34190    #[doc = "ID: 46"]
34191    MISSION_ITEM_REACHED(MISSION_ITEM_REACHED_DATA),
34192    #[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
34193    #[doc = ""]
34194    #[doc = "ID: 40"]
34195    #[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
34196    MISSION_REQUEST(MISSION_REQUEST_DATA),
34197    #[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
34198    #[doc = ""]
34199    #[doc = "ID: 51"]
34200    MISSION_REQUEST_INT(MISSION_REQUEST_INT_DATA),
34201    #[doc = "Request the overall list of mission items from the system/component."]
34202    #[doc = ""]
34203    #[doc = "ID: 43"]
34204    MISSION_REQUEST_LIST(MISSION_REQUEST_LIST_DATA),
34205    #[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
34206    #[doc = ""]
34207    #[doc = "ID: 37"]
34208    MISSION_REQUEST_PARTIAL_LIST(MISSION_REQUEST_PARTIAL_LIST_DATA),
34209    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
34210    #[doc = ""]
34211    #[doc = "ID: 41"]
34212    #[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
34213    MISSION_SET_CURRENT(MISSION_SET_CURRENT_DATA),
34214    #[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
34215    #[doc = ""]
34216    #[doc = "ID: 38"]
34217    MISSION_WRITE_PARTIAL_LIST(MISSION_WRITE_PARTIAL_LIST_DATA),
34218    #[doc = "Orientation of a mount."]
34219    #[doc = ""]
34220    #[doc = "ID: 265"]
34221    #[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
34222    MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA),
34223    #[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
34224    #[doc = ""]
34225    #[doc = "ID: 251"]
34226    NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA),
34227    #[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
34228    #[doc = ""]
34229    #[doc = "ID: 252"]
34230    NAMED_VALUE_INT(NAMED_VALUE_INT_DATA),
34231    #[doc = "The state of the navigation and position controller."]
34232    #[doc = ""]
34233    #[doc = "ID: 62"]
34234    NAV_CONTROLLER_OUTPUT(NAV_CONTROLLER_OUTPUT_DATA),
34235    #[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
34236    #[doc = ""]
34237    #[doc = "ID: 330"]
34238    OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA),
34239    #[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
34240    #[doc = ""]
34241    #[doc = "ID: 331"]
34242    ODOMETRY(ODOMETRY_DATA),
34243    #[doc = "Hardware status sent by an onboard computer."]
34244    #[doc = ""]
34245    #[doc = "ID: 390"]
34246    ONBOARD_COMPUTER_STATUS(ONBOARD_COMPUTER_STATUS_DATA),
34247    #[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
34248    #[doc = ""]
34249    #[doc = "ID: 12918"]
34250    OPEN_DRONE_ID_ARM_STATUS(OPEN_DRONE_ID_ARM_STATUS_DATA),
34251    #[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
34252    #[doc = ""]
34253    #[doc = "ID: 12902"]
34254    OPEN_DRONE_ID_AUTHENTICATION(OPEN_DRONE_ID_AUTHENTICATION_DATA),
34255    #[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
34256    #[doc = ""]
34257    #[doc = "ID: 12900"]
34258    OPEN_DRONE_ID_BASIC_ID(OPEN_DRONE_ID_BASIC_ID_DATA),
34259    #[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
34260    #[doc = ""]
34261    #[doc = "ID: 12901"]
34262    OPEN_DRONE_ID_LOCATION(OPEN_DRONE_ID_LOCATION_DATA),
34263    #[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
34264    #[doc = ""]
34265    #[doc = "ID: 12915"]
34266    OPEN_DRONE_ID_MESSAGE_PACK(OPEN_DRONE_ID_MESSAGE_PACK_DATA),
34267    #[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
34268    #[doc = ""]
34269    #[doc = "ID: 12905"]
34270    OPEN_DRONE_ID_OPERATOR_ID(OPEN_DRONE_ID_OPERATOR_ID_DATA),
34271    #[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
34272    #[doc = ""]
34273    #[doc = "ID: 12903"]
34274    OPEN_DRONE_ID_SELF_ID(OPEN_DRONE_ID_SELF_ID_DATA),
34275    #[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
34276    #[doc = ""]
34277    #[doc = "ID: 12904"]
34278    OPEN_DRONE_ID_SYSTEM(OPEN_DRONE_ID_SYSTEM_DATA),
34279    #[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
34280    #[doc = ""]
34281    #[doc = "ID: 12919"]
34282    OPEN_DRONE_ID_SYSTEM_UPDATE(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA),
34283    #[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
34284    #[doc = ""]
34285    #[doc = "ID: 100"]
34286    OPTICAL_FLOW(OPTICAL_FLOW_DATA),
34287    #[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
34288    #[doc = ""]
34289    #[doc = "ID: 106"]
34290    OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA),
34291    #[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
34292    #[doc = ""]
34293    #[doc = "ID: 360"]
34294    ORBIT_EXECUTION_STATUS(ORBIT_EXECUTION_STATUS_DATA),
34295    #[doc = "Response from a PARAM_EXT_SET message."]
34296    #[doc = ""]
34297    #[doc = "ID: 324"]
34298    PARAM_EXT_ACK(PARAM_EXT_ACK_DATA),
34299    #[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
34300    #[doc = ""]
34301    #[doc = "ID: 321"]
34302    PARAM_EXT_REQUEST_LIST(PARAM_EXT_REQUEST_LIST_DATA),
34303    #[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
34304    #[doc = ""]
34305    #[doc = "ID: 320"]
34306    PARAM_EXT_REQUEST_READ(PARAM_EXT_REQUEST_READ_DATA),
34307    #[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
34308    #[doc = ""]
34309    #[doc = "ID: 323"]
34310    PARAM_EXT_SET(PARAM_EXT_SET_DATA),
34311    #[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
34312    #[doc = ""]
34313    #[doc = "ID: 322"]
34314    PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA),
34315    #[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
34316    #[doc = ""]
34317    #[doc = "ID: 50"]
34318    PARAM_MAP_RC(PARAM_MAP_RC_DATA),
34319    #[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
34320    #[doc = ""]
34321    #[doc = "ID: 21"]
34322    PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA),
34323    #[doc = "value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
34324    #[doc = ""]
34325    #[doc = "ID: 20"]
34326    PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA),
34327    #[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
34328    #[doc = ""]
34329    #[doc = "ID: 23"]
34330    PARAM_SET(PARAM_SET_DATA),
34331    #[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
34332    #[doc = ""]
34333    #[doc = "ID: 22"]
34334    PARAM_VALUE(PARAM_VALUE_DATA),
34335    #[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
34336    #[doc = ""]
34337    #[doc = "ID: 4"]
34338    #[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
34339    PING(PING_DATA),
34340    #[doc = "Control vehicle tone generation (buzzer)."]
34341    #[doc = ""]
34342    #[doc = "ID: 258"]
34343    #[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
34344    PLAY_TUNE(PLAY_TUNE_DATA),
34345    #[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
34346    #[doc = ""]
34347    #[doc = "ID: 400"]
34348    PLAY_TUNE_V2(PLAY_TUNE_V2_DATA),
34349    #[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
34350    #[doc = ""]
34351    #[doc = "ID: 87"]
34352    POSITION_TARGET_GLOBAL_INT(POSITION_TARGET_GLOBAL_INT_DATA),
34353    #[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
34354    #[doc = ""]
34355    #[doc = "ID: 85"]
34356    POSITION_TARGET_LOCAL_NED(POSITION_TARGET_LOCAL_NED_DATA),
34357    #[doc = "Power supply status."]
34358    #[doc = ""]
34359    #[doc = "ID: 125"]
34360    POWER_STATUS(POWER_STATUS_DATA),
34361    #[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
34362    #[doc = ""]
34363    #[doc = "ID: 300"]
34364    PROTOCOL_VERSION(PROTOCOL_VERSION_DATA),
34365    #[doc = "RC channel outputs from a MAVLink RC receiver for input to a flight controller or other components (allows an RC receiver to connect via MAVLink instead of some other protocol such as PPM-Sum or S.BUS).         Note that this is not intended to be an over-the-air format, and does not replace RC_CHANNELS and similar messages reported by the flight controller.         The target_system field should normally be set to the system id of the system to control, typically the flight controller.         The target_component field can normally be set to 0, so that all components of the system can receive the message.         The channels array field can publish up to 32 channels; the number of channel items used in the array is specified in the count field.         The time_last_update_ms field contains the timestamp of the last received valid channels data in the receiver's time domain.         The count field indicates the first index of the channel array that is not used for channel data (this and later indexes are zero-filled).         The RADIO_RC_CHANNELS_FLAGS_OUTDATED flag is set by the receiver if the channels data is not up-to-date (for example, if new data from the transmitter could not be validated so the last valid data is resent).         The RADIO_RC_CHANNELS_FLAGS_FAILSAFE failsafe flag is set by the receiver if the receiver's failsafe condition is met (implementation dependent, e.g., connection to the RC radio is lost).         In this case time_last_update_ms still contains the timestamp of the last valid channels data, but the content of the channels data is not defined by the protocol (it is up to the implementation of the receiver).         For instance, the channels data could contain failsafe values configured in the receiver; the default is to carry the last valid data.         Note: The RC channels fields are extensions to ensure that they are located at the end of the serialized payload and subject to MAVLink's trailing-zero trimming."]
34366    #[doc = ""]
34367    #[doc = "ID: 420"]
34368    RADIO_RC_CHANNELS(RADIO_RC_CHANNELS_DATA),
34369    #[doc = "Status generated by radio and injected into MAVLink stream."]
34370    #[doc = ""]
34371    #[doc = "ID: 109"]
34372    RADIO_STATUS(RADIO_STATUS_DATA),
34373    #[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
34374    #[doc = ""]
34375    #[doc = "ID: 27"]
34376    RAW_IMU(RAW_IMU_DATA),
34377    #[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
34378    #[doc = ""]
34379    #[doc = "ID: 28"]
34380    RAW_PRESSURE(RAW_PRESSURE_DATA),
34381    #[doc = "RPM sensor data message."]
34382    #[doc = ""]
34383    #[doc = "ID: 339"]
34384    RAW_RPM(RAW_RPM_DATA),
34385    #[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
34386    #[doc = ""]
34387    #[doc = "ID: 65"]
34388    RC_CHANNELS(RC_CHANNELS_DATA),
34389    #[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
34390    #[doc = ""]
34391    #[doc = "ID: 70"]
34392    RC_CHANNELS_OVERRIDE(RC_CHANNELS_OVERRIDE_DATA),
34393    #[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
34394    #[doc = ""]
34395    #[doc = "ID: 35"]
34396    RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA),
34397    #[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
34398    #[doc = ""]
34399    #[doc = "ID: 34"]
34400    RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA),
34401    #[doc = "Request a data stream."]
34402    #[doc = ""]
34403    #[doc = "ID: 66"]
34404    #[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
34405    REQUEST_DATA_STREAM(REQUEST_DATA_STREAM_DATA),
34406    #[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
34407    #[doc = ""]
34408    #[doc = "ID: 412"]
34409    REQUEST_EVENT(REQUEST_EVENT_DATA),
34410    #[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
34411    #[doc = ""]
34412    #[doc = "ID: 142"]
34413    RESOURCE_REQUEST(RESOURCE_REQUEST_DATA),
34414    #[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
34415    #[doc = ""]
34416    #[doc = "ID: 413"]
34417    RESPONSE_EVENT_ERROR(RESPONSE_EVENT_ERROR_DATA),
34418    #[doc = "Read out the safety zone the MAV currently assumes."]
34419    #[doc = ""]
34420    #[doc = "ID: 55"]
34421    SAFETY_ALLOWED_AREA(SAFETY_ALLOWED_AREA_DATA),
34422    #[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
34423    #[doc = ""]
34424    #[doc = "ID: 54"]
34425    SAFETY_SET_ALLOWED_AREA(SAFETY_SET_ALLOWED_AREA_DATA),
34426    #[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
34427    #[doc = ""]
34428    #[doc = "ID: 26"]
34429    SCALED_IMU(SCALED_IMU_DATA),
34430    #[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
34431    #[doc = ""]
34432    #[doc = "ID: 116"]
34433    SCALED_IMU2(SCALED_IMU2_DATA),
34434    #[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
34435    #[doc = ""]
34436    #[doc = "ID: 129"]
34437    SCALED_IMU3(SCALED_IMU3_DATA),
34438    #[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
34439    #[doc = ""]
34440    #[doc = "ID: 29"]
34441    SCALED_PRESSURE(SCALED_PRESSURE_DATA),
34442    #[doc = "Barometer readings for 2nd barometer."]
34443    #[doc = ""]
34444    #[doc = "ID: 137"]
34445    SCALED_PRESSURE2(SCALED_PRESSURE2_DATA),
34446    #[doc = "Barometer readings for 3rd barometer."]
34447    #[doc = ""]
34448    #[doc = "ID: 143"]
34449    SCALED_PRESSURE3(SCALED_PRESSURE3_DATA),
34450    #[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
34451    #[doc = ""]
34452    #[doc = "ID: 126"]
34453    SERIAL_CONTROL(SERIAL_CONTROL_DATA),
34454    #[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
34455    #[doc = ""]
34456    #[doc = "ID: 36"]
34457    SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA),
34458    #[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
34459    #[doc = ""]
34460    #[doc = "ID: 256"]
34461    SETUP_SIGNING(SETUP_SIGNING_DATA),
34462    #[doc = "Set the vehicle attitude and body angular rates."]
34463    #[doc = ""]
34464    #[doc = "ID: 139"]
34465    SET_ACTUATOR_CONTROL_TARGET(SET_ACTUATOR_CONTROL_TARGET_DATA),
34466    #[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
34467    #[doc = ""]
34468    #[doc = "ID: 82"]
34469    SET_ATTITUDE_TARGET(SET_ATTITUDE_TARGET_DATA),
34470    #[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
34471    #[doc = ""]
34472    #[doc = "ID: 48"]
34473    #[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
34474    SET_GPS_GLOBAL_ORIGIN(SET_GPS_GLOBAL_ORIGIN_DATA),
34475    #[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
34476    #[doc = ""]
34477    #[doc = "ID: 243"]
34478    #[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
34479    SET_HOME_POSITION(SET_HOME_POSITION_DATA),
34480    #[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
34481    #[doc = ""]
34482    #[doc = "ID: 11"]
34483    #[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
34484    SET_MODE(SET_MODE_DATA),
34485    #[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
34486    #[doc = ""]
34487    #[doc = "ID: 86"]
34488    SET_POSITION_TARGET_GLOBAL_INT(SET_POSITION_TARGET_GLOBAL_INT_DATA),
34489    #[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
34490    #[doc = ""]
34491    #[doc = "ID: 84"]
34492    SET_POSITION_TARGET_LOCAL_NED(SET_POSITION_TARGET_LOCAL_NED_DATA),
34493    #[doc = "Set temporary maximum limits for horizontal speed, vertical speed and yaw rate.         The consumer must stream the current limits in VELOCITY_LIMITS at 1 Hz or more (when limits are being set).         The consumer should latch the limits until a new limit is received or the mode is changed."]
34494    #[doc = ""]
34495    #[doc = "ID: 354"]
34496    SET_VELOCITY_LIMITS(SET_VELOCITY_LIMITS_DATA),
34497    #[doc = "Status of simulation environment, if used."]
34498    #[doc = ""]
34499    #[doc = "ID: 108"]
34500    SIM_STATE(SIM_STATE_DATA),
34501    #[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
34502    #[doc = ""]
34503    #[doc = "ID: 370"]
34504    #[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
34505    SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA),
34506    #[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
34507    #[doc = ""]
34508    #[doc = "ID: 253"]
34509    STATUSTEXT(STATUSTEXT_DATA),
34510    #[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
34511    #[doc = ""]
34512    #[doc = "ID: 261"]
34513    STORAGE_INFORMATION(STORAGE_INFORMATION_DATA),
34514    #[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
34515    #[doc = ""]
34516    #[doc = "ID: 401"]
34517    SUPPORTED_TUNES(SUPPORTED_TUNES_DATA),
34518    #[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
34519    #[doc = ""]
34520    #[doc = "ID: 2"]
34521    SYSTEM_TIME(SYSTEM_TIME_DATA),
34522    #[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
34523    #[doc = ""]
34524    #[doc = "ID: 1"]
34525    SYS_STATUS(SYS_STATUS_DATA),
34526    #[doc = "Current motion information from sensors on a target."]
34527    #[doc = ""]
34528    #[doc = "ID: 510"]
34529    TARGET_ABSOLUTE(TARGET_ABSOLUTE_DATA),
34530    #[doc = "The location of a target measured by MAV's onboard sensors."]
34531    #[doc = ""]
34532    #[doc = "ID: 511"]
34533    TARGET_RELATIVE(TARGET_RELATIVE_DATA),
34534    #[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
34535    #[doc = ""]
34536    #[doc = "ID: 135"]
34537    TERRAIN_CHECK(TERRAIN_CHECK_DATA),
34538    #[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
34539    #[doc = ""]
34540    #[doc = "ID: 134"]
34541    TERRAIN_DATA(TERRAIN_DATA_DATA),
34542    #[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
34543    #[doc = ""]
34544    #[doc = "ID: 136"]
34545    TERRAIN_REPORT(TERRAIN_REPORT_DATA),
34546    #[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
34547    #[doc = ""]
34548    #[doc = "ID: 133"]
34549    TERRAIN_REQUEST(TERRAIN_REQUEST_DATA),
34550    #[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
34551    #[doc = ""]
34552    #[doc = "ID: 111"]
34553    TIMESYNC(TIMESYNC_DATA),
34554    #[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
34555    #[doc = ""]
34556    #[doc = "ID: 380"]
34557    TIME_ESTIMATE_TO_TARGET(TIME_ESTIMATE_TO_TARGET_DATA),
34558    #[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
34559    #[doc = ""]
34560    #[doc = "ID: 333"]
34561    TRAJECTORY_REPRESENTATION_BEZIER(TRAJECTORY_REPRESENTATION_BEZIER_DATA),
34562    #[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
34563    #[doc = ""]
34564    #[doc = "ID: 332"]
34565    TRAJECTORY_REPRESENTATION_WAYPOINTS(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA),
34566    #[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
34567    #[doc = ""]
34568    #[doc = "ID: 385"]
34569    TUNNEL(TUNNEL_DATA),
34570    #[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
34571    #[doc = ""]
34572    #[doc = "ID: 311"]
34573    UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA),
34574    #[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
34575    #[doc = ""]
34576    #[doc = "ID: 310"]
34577    UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA),
34578    #[doc = "The global position resulting from GPS and sensor fusion."]
34579    #[doc = ""]
34580    #[doc = "ID: 340"]
34581    UTM_GLOBAL_POSITION(UTM_GLOBAL_POSITION_DATA),
34582    #[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
34583    #[doc = ""]
34584    #[doc = "ID: 248"]
34585    V2_EXTENSION(V2_EXTENSION_DATA),
34586    #[doc = "Current limits for horizontal speed, vertical speed and yaw rate, as set by SET_VELOCITY_LIMITS."]
34587    #[doc = ""]
34588    #[doc = "ID: 355"]
34589    VELOCITY_LIMITS(VELOCITY_LIMITS_DATA),
34590    #[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
34591    #[doc = ""]
34592    #[doc = "ID: 74"]
34593    VFR_HUD(VFR_HUD_DATA),
34594    #[doc = "Vibration levels and accelerometer clipping."]
34595    #[doc = ""]
34596    #[doc = "ID: 241"]
34597    VIBRATION(VIBRATION_DATA),
34598    #[doc = "Global position estimate from a Vicon motion system source."]
34599    #[doc = ""]
34600    #[doc = "ID: 104"]
34601    VICON_POSITION_ESTIMATE(VICON_POSITION_ESTIMATE_DATA),
34602    #[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
34603    #[doc = ""]
34604    #[doc = "ID: 269"]
34605    VIDEO_STREAM_INFORMATION(VIDEO_STREAM_INFORMATION_DATA),
34606    #[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
34607    #[doc = ""]
34608    #[doc = "ID: 270"]
34609    VIDEO_STREAM_STATUS(VIDEO_STREAM_STATUS_DATA),
34610    #[doc = "Local position/attitude estimate from a vision source."]
34611    #[doc = ""]
34612    #[doc = "ID: 102"]
34613    VISION_POSITION_ESTIMATE(VISION_POSITION_ESTIMATE_DATA),
34614    #[doc = "Speed estimate from a vision source."]
34615    #[doc = ""]
34616    #[doc = "ID: 103"]
34617    VISION_SPEED_ESTIMATE(VISION_SPEED_ESTIMATE_DATA),
34618    #[doc = "Cumulative distance traveled for each reported wheel."]
34619    #[doc = ""]
34620    #[doc = "ID: 9000"]
34621    WHEEL_DISTANCE(WHEEL_DISTANCE_DATA),
34622    #[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
34623    #[doc = ""]
34624    #[doc = "ID: 299"]
34625    WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA),
34626    #[doc = "Winch status."]
34627    #[doc = ""]
34628    #[doc = "ID: 9005"]
34629    WINCH_STATUS(WINCH_STATUS_DATA),
34630    #[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
34631    #[doc = ""]
34632    #[doc = "ID: 231"]
34633    WIND_COV(WIND_COV_DATA),
34634}
34635impl MavMessage {
34636    pub const fn all_ids() -> &'static [u32] {
34637        &[
34638            0u32, 1u32, 2u32, 4u32, 5u32, 6u32, 7u32, 8u32, 11u32, 20u32, 21u32, 22u32, 23u32,
34639            24u32, 25u32, 26u32, 27u32, 28u32, 29u32, 30u32, 31u32, 32u32, 33u32, 34u32, 35u32,
34640            36u32, 37u32, 38u32, 39u32, 40u32, 41u32, 42u32, 43u32, 44u32, 45u32, 46u32, 47u32,
34641            48u32, 49u32, 50u32, 51u32, 54u32, 55u32, 61u32, 62u32, 63u32, 64u32, 65u32, 66u32,
34642            67u32, 69u32, 70u32, 73u32, 74u32, 75u32, 76u32, 77u32, 80u32, 81u32, 82u32, 83u32,
34643            84u32, 85u32, 86u32, 87u32, 89u32, 90u32, 91u32, 92u32, 93u32, 100u32, 101u32, 102u32,
34644            103u32, 104u32, 105u32, 106u32, 107u32, 108u32, 109u32, 110u32, 111u32, 112u32, 113u32,
34645            114u32, 115u32, 116u32, 117u32, 118u32, 119u32, 120u32, 121u32, 122u32, 123u32, 124u32,
34646            125u32, 126u32, 127u32, 128u32, 129u32, 130u32, 131u32, 132u32, 133u32, 134u32, 135u32,
34647            136u32, 137u32, 138u32, 139u32, 140u32, 141u32, 142u32, 143u32, 144u32, 146u32, 147u32,
34648            148u32, 149u32, 162u32, 192u32, 225u32, 230u32, 231u32, 232u32, 233u32, 234u32, 235u32,
34649            241u32, 242u32, 243u32, 244u32, 245u32, 246u32, 247u32, 248u32, 249u32, 250u32, 251u32,
34650            252u32, 253u32, 254u32, 256u32, 257u32, 258u32, 259u32, 260u32, 261u32, 262u32, 263u32,
34651            264u32, 265u32, 266u32, 267u32, 268u32, 269u32, 270u32, 271u32, 275u32, 276u32, 277u32,
34652            280u32, 281u32, 282u32, 283u32, 284u32, 285u32, 286u32, 287u32, 288u32, 290u32, 291u32,
34653            295u32, 299u32, 300u32, 301u32, 310u32, 311u32, 320u32, 321u32, 322u32, 323u32, 324u32,
34654            330u32, 331u32, 332u32, 333u32, 334u32, 335u32, 336u32, 339u32, 340u32, 350u32, 354u32,
34655            355u32, 360u32, 361u32, 369u32, 370u32, 371u32, 372u32, 373u32, 375u32, 380u32, 385u32,
34656            386u32, 387u32, 388u32, 390u32, 395u32, 396u32, 397u32, 400u32, 401u32, 410u32, 411u32,
34657            412u32, 413u32, 414u32, 415u32, 420u32, 435u32, 436u32, 437u32, 440u32, 441u32, 510u32,
34658            511u32, 512u32, 9000u32, 9005u32, 12900u32, 12901u32, 12902u32, 12903u32, 12904u32,
34659            12905u32, 12915u32, 12918u32, 12919u32, 12920u32,
34660        ]
34661    }
34662}
34663impl Message for MavMessage {
34664    fn parse(
34665        version: MavlinkVersion,
34666        id: u32,
34667        payload: &[u8],
34668    ) -> Result<Self, ::mavlink_core::error::ParserError> {
34669        match id {
34670            ACTUATOR_CONTROL_TARGET_DATA::ID => {
34671                ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
34672                    .map(Self::ACTUATOR_CONTROL_TARGET)
34673            }
34674            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::deser(version, payload)
34675                .map(Self::ACTUATOR_OUTPUT_STATUS),
34676            ADSB_VEHICLE_DATA::ID => {
34677                ADSB_VEHICLE_DATA::deser(version, payload).map(Self::ADSB_VEHICLE)
34678            }
34679            AIRSPEED_DATA::ID => AIRSPEED_DATA::deser(version, payload).map(Self::AIRSPEED),
34680            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::deser(version, payload).map(Self::AIS_VESSEL),
34681            ALTITUDE_DATA::ID => ALTITUDE_DATA::deser(version, payload).map(Self::ALTITUDE),
34682            ATTITUDE_DATA::ID => ATTITUDE_DATA::deser(version, payload).map(Self::ATTITUDE),
34683            ATTITUDE_QUATERNION_DATA::ID => {
34684                ATTITUDE_QUATERNION_DATA::deser(version, payload).map(Self::ATTITUDE_QUATERNION)
34685            }
34686            ATTITUDE_QUATERNION_COV_DATA::ID => {
34687                ATTITUDE_QUATERNION_COV_DATA::deser(version, payload)
34688                    .map(Self::ATTITUDE_QUATERNION_COV)
34689            }
34690            ATTITUDE_TARGET_DATA::ID => {
34691                ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::ATTITUDE_TARGET)
34692            }
34693            ATT_POS_MOCAP_DATA::ID => {
34694                ATT_POS_MOCAP_DATA::deser(version, payload).map(Self::ATT_POS_MOCAP)
34695            }
34696            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::deser(version, payload).map(Self::AUTH_KEY),
34697            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
34698                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::deser(version, payload)
34699                    .map(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE)
34700            }
34701            AUTOPILOT_VERSION_DATA::ID => {
34702                AUTOPILOT_VERSION_DATA::deser(version, payload).map(Self::AUTOPILOT_VERSION)
34703            }
34704            AVAILABLE_MODES_DATA::ID => {
34705                AVAILABLE_MODES_DATA::deser(version, payload).map(Self::AVAILABLE_MODES)
34706            }
34707            AVAILABLE_MODES_MONITOR_DATA::ID => {
34708                AVAILABLE_MODES_MONITOR_DATA::deser(version, payload)
34709                    .map(Self::AVAILABLE_MODES_MONITOR)
34710            }
34711            BATTERY_INFO_DATA::ID => {
34712                BATTERY_INFO_DATA::deser(version, payload).map(Self::BATTERY_INFO)
34713            }
34714            BATTERY_STATUS_DATA::ID => {
34715                BATTERY_STATUS_DATA::deser(version, payload).map(Self::BATTERY_STATUS)
34716            }
34717            BATTERY_STATUS_V2_DATA::ID => {
34718                BATTERY_STATUS_V2_DATA::deser(version, payload).map(Self::BATTERY_STATUS_V2)
34719            }
34720            BUTTON_CHANGE_DATA::ID => {
34721                BUTTON_CHANGE_DATA::deser(version, payload).map(Self::BUTTON_CHANGE)
34722            }
34723            CAMERA_CAPTURE_STATUS_DATA::ID => {
34724                CAMERA_CAPTURE_STATUS_DATA::deser(version, payload).map(Self::CAMERA_CAPTURE_STATUS)
34725            }
34726            CAMERA_FOV_STATUS_DATA::ID => {
34727                CAMERA_FOV_STATUS_DATA::deser(version, payload).map(Self::CAMERA_FOV_STATUS)
34728            }
34729            CAMERA_IMAGE_CAPTURED_DATA::ID => {
34730                CAMERA_IMAGE_CAPTURED_DATA::deser(version, payload).map(Self::CAMERA_IMAGE_CAPTURED)
34731            }
34732            CAMERA_INFORMATION_DATA::ID => {
34733                CAMERA_INFORMATION_DATA::deser(version, payload).map(Self::CAMERA_INFORMATION)
34734            }
34735            CAMERA_SETTINGS_DATA::ID => {
34736                CAMERA_SETTINGS_DATA::deser(version, payload).map(Self::CAMERA_SETTINGS)
34737            }
34738            CAMERA_THERMAL_RANGE_DATA::ID => {
34739                CAMERA_THERMAL_RANGE_DATA::deser(version, payload).map(Self::CAMERA_THERMAL_RANGE)
34740            }
34741            CAMERA_TRACKING_GEO_STATUS_DATA::ID => {
34742                CAMERA_TRACKING_GEO_STATUS_DATA::deser(version, payload)
34743                    .map(Self::CAMERA_TRACKING_GEO_STATUS)
34744            }
34745            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => {
34746                CAMERA_TRACKING_IMAGE_STATUS_DATA::deser(version, payload)
34747                    .map(Self::CAMERA_TRACKING_IMAGE_STATUS)
34748            }
34749            CAMERA_TRIGGER_DATA::ID => {
34750                CAMERA_TRIGGER_DATA::deser(version, payload).map(Self::CAMERA_TRIGGER)
34751            }
34752            CANFD_FRAME_DATA::ID => {
34753                CANFD_FRAME_DATA::deser(version, payload).map(Self::CANFD_FRAME)
34754            }
34755            CAN_FILTER_MODIFY_DATA::ID => {
34756                CAN_FILTER_MODIFY_DATA::deser(version, payload).map(Self::CAN_FILTER_MODIFY)
34757            }
34758            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::deser(version, payload).map(Self::CAN_FRAME),
34759            CELLULAR_CONFIG_DATA::ID => {
34760                CELLULAR_CONFIG_DATA::deser(version, payload).map(Self::CELLULAR_CONFIG)
34761            }
34762            CELLULAR_STATUS_DATA::ID => {
34763                CELLULAR_STATUS_DATA::deser(version, payload).map(Self::CELLULAR_STATUS)
34764            }
34765            CHANGE_OPERATOR_CONTROL_DATA::ID => {
34766                CHANGE_OPERATOR_CONTROL_DATA::deser(version, payload)
34767                    .map(Self::CHANGE_OPERATOR_CONTROL)
34768            }
34769            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => {
34770                CHANGE_OPERATOR_CONTROL_ACK_DATA::deser(version, payload)
34771                    .map(Self::CHANGE_OPERATOR_CONTROL_ACK)
34772            }
34773            COLLISION_DATA::ID => COLLISION_DATA::deser(version, payload).map(Self::COLLISION),
34774            COMMAND_ACK_DATA::ID => {
34775                COMMAND_ACK_DATA::deser(version, payload).map(Self::COMMAND_ACK)
34776            }
34777            COMMAND_CANCEL_DATA::ID => {
34778                COMMAND_CANCEL_DATA::deser(version, payload).map(Self::COMMAND_CANCEL)
34779            }
34780            COMMAND_INT_DATA::ID => {
34781                COMMAND_INT_DATA::deser(version, payload).map(Self::COMMAND_INT)
34782            }
34783            COMMAND_LONG_DATA::ID => {
34784                COMMAND_LONG_DATA::deser(version, payload).map(Self::COMMAND_LONG)
34785            }
34786            COMPONENT_INFORMATION_DATA::ID => {
34787                COMPONENT_INFORMATION_DATA::deser(version, payload).map(Self::COMPONENT_INFORMATION)
34788            }
34789            COMPONENT_INFORMATION_BASIC_DATA::ID => {
34790                COMPONENT_INFORMATION_BASIC_DATA::deser(version, payload)
34791                    .map(Self::COMPONENT_INFORMATION_BASIC)
34792            }
34793            COMPONENT_METADATA_DATA::ID => {
34794                COMPONENT_METADATA_DATA::deser(version, payload).map(Self::COMPONENT_METADATA)
34795            }
34796            CONTROL_STATUS_DATA::ID => {
34797                CONTROL_STATUS_DATA::deser(version, payload).map(Self::CONTROL_STATUS)
34798            }
34799            CONTROL_SYSTEM_STATE_DATA::ID => {
34800                CONTROL_SYSTEM_STATE_DATA::deser(version, payload).map(Self::CONTROL_SYSTEM_STATE)
34801            }
34802            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::deser(version, payload)
34803                .map(Self::CURRENT_EVENT_SEQUENCE),
34804            CURRENT_MODE_DATA::ID => {
34805                CURRENT_MODE_DATA::deser(version, payload).map(Self::CURRENT_MODE)
34806            }
34807            DATA_STREAM_DATA::ID => {
34808                DATA_STREAM_DATA::deser(version, payload).map(Self::DATA_STREAM)
34809            }
34810            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => {
34811                DATA_TRANSMISSION_HANDSHAKE_DATA::deser(version, payload)
34812                    .map(Self::DATA_TRANSMISSION_HANDSHAKE)
34813            }
34814            DEBUG_DATA::ID => DEBUG_DATA::deser(version, payload).map(Self::DEBUG),
34815            DEBUG_FLOAT_ARRAY_DATA::ID => {
34816                DEBUG_FLOAT_ARRAY_DATA::deser(version, payload).map(Self::DEBUG_FLOAT_ARRAY)
34817            }
34818            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::deser(version, payload).map(Self::DEBUG_VECT),
34819            DISTANCE_SENSOR_DATA::ID => {
34820                DISTANCE_SENSOR_DATA::deser(version, payload).map(Self::DISTANCE_SENSOR)
34821            }
34822            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::deser(version, payload).map(Self::EFI_STATUS),
34823            ENCAPSULATED_DATA_DATA::ID => {
34824                ENCAPSULATED_DATA_DATA::deser(version, payload).map(Self::ENCAPSULATED_DATA)
34825            }
34826            ESC_INFO_DATA::ID => ESC_INFO_DATA::deser(version, payload).map(Self::ESC_INFO),
34827            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::deser(version, payload).map(Self::ESC_STATUS),
34828            ESTIMATOR_STATUS_DATA::ID => {
34829                ESTIMATOR_STATUS_DATA::deser(version, payload).map(Self::ESTIMATOR_STATUS)
34830            }
34831            EVENT_DATA::ID => EVENT_DATA::deser(version, payload).map(Self::EVENT),
34832            EXTENDED_SYS_STATE_DATA::ID => {
34833                EXTENDED_SYS_STATE_DATA::deser(version, payload).map(Self::EXTENDED_SYS_STATE)
34834            }
34835            FENCE_STATUS_DATA::ID => {
34836                FENCE_STATUS_DATA::deser(version, payload).map(Self::FENCE_STATUS)
34837            }
34838            FIGURE_EIGHT_EXECUTION_STATUS_DATA::ID => {
34839                FIGURE_EIGHT_EXECUTION_STATUS_DATA::deser(version, payload)
34840                    .map(Self::FIGURE_EIGHT_EXECUTION_STATUS)
34841            }
34842            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::deser(version, payload)
34843                .map(Self::FILE_TRANSFER_PROTOCOL),
34844            FLIGHT_INFORMATION_DATA::ID => {
34845                FLIGHT_INFORMATION_DATA::deser(version, payload).map(Self::FLIGHT_INFORMATION)
34846            }
34847            FOLLOW_TARGET_DATA::ID => {
34848                FOLLOW_TARGET_DATA::deser(version, payload).map(Self::FOLLOW_TARGET)
34849            }
34850            FUEL_STATUS_DATA::ID => {
34851                FUEL_STATUS_DATA::deser(version, payload).map(Self::FUEL_STATUS)
34852            }
34853            GENERATOR_STATUS_DATA::ID => {
34854                GENERATOR_STATUS_DATA::deser(version, payload).map(Self::GENERATOR_STATUS)
34855            }
34856            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => {
34857                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::deser(version, payload)
34858                    .map(Self::GIMBAL_DEVICE_ATTITUDE_STATUS)
34859            }
34860            GIMBAL_DEVICE_INFORMATION_DATA::ID => {
34861                GIMBAL_DEVICE_INFORMATION_DATA::deser(version, payload)
34862                    .map(Self::GIMBAL_DEVICE_INFORMATION)
34863            }
34864            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => {
34865                GIMBAL_DEVICE_SET_ATTITUDE_DATA::deser(version, payload)
34866                    .map(Self::GIMBAL_DEVICE_SET_ATTITUDE)
34867            }
34868            GIMBAL_MANAGER_INFORMATION_DATA::ID => {
34869                GIMBAL_MANAGER_INFORMATION_DATA::deser(version, payload)
34870                    .map(Self::GIMBAL_MANAGER_INFORMATION)
34871            }
34872            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => {
34873                GIMBAL_MANAGER_SET_ATTITUDE_DATA::deser(version, payload)
34874                    .map(Self::GIMBAL_MANAGER_SET_ATTITUDE)
34875            }
34876            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
34877                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::deser(version, payload)
34878                    .map(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL)
34879            }
34880            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => {
34881                GIMBAL_MANAGER_SET_PITCHYAW_DATA::deser(version, payload)
34882                    .map(Self::GIMBAL_MANAGER_SET_PITCHYAW)
34883            }
34884            GIMBAL_MANAGER_STATUS_DATA::ID => {
34885                GIMBAL_MANAGER_STATUS_DATA::deser(version, payload).map(Self::GIMBAL_MANAGER_STATUS)
34886            }
34887            GLOBAL_POSITION_INT_DATA::ID => {
34888                GLOBAL_POSITION_INT_DATA::deser(version, payload).map(Self::GLOBAL_POSITION_INT)
34889            }
34890            GLOBAL_POSITION_INT_COV_DATA::ID => {
34891                GLOBAL_POSITION_INT_COV_DATA::deser(version, payload)
34892                    .map(Self::GLOBAL_POSITION_INT_COV)
34893            }
34894            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
34895                GLOBAL_VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
34896                    .map(Self::GLOBAL_VISION_POSITION_ESTIMATE)
34897            }
34898            GNSS_INTEGRITY_DATA::ID => {
34899                GNSS_INTEGRITY_DATA::deser(version, payload).map(Self::GNSS_INTEGRITY)
34900            }
34901            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::deser(version, payload).map(Self::GPS2_RAW),
34902            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::deser(version, payload).map(Self::GPS2_RTK),
34903            GPS_GLOBAL_ORIGIN_DATA::ID => {
34904                GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::GPS_GLOBAL_ORIGIN)
34905            }
34906            GPS_INJECT_DATA_DATA::ID => {
34907                GPS_INJECT_DATA_DATA::deser(version, payload).map(Self::GPS_INJECT_DATA)
34908            }
34909            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::deser(version, payload).map(Self::GPS_INPUT),
34910            GPS_RAW_INT_DATA::ID => {
34911                GPS_RAW_INT_DATA::deser(version, payload).map(Self::GPS_RAW_INT)
34912            }
34913            GPS_RTCM_DATA_DATA::ID => {
34914                GPS_RTCM_DATA_DATA::deser(version, payload).map(Self::GPS_RTCM_DATA)
34915            }
34916            GPS_RTK_DATA::ID => GPS_RTK_DATA::deser(version, payload).map(Self::GPS_RTK),
34917            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::deser(version, payload).map(Self::GPS_STATUS),
34918            GROUP_END_DATA::ID => GROUP_END_DATA::deser(version, payload).map(Self::GROUP_END),
34919            GROUP_START_DATA::ID => {
34920                GROUP_START_DATA::deser(version, payload).map(Self::GROUP_START)
34921            }
34922            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::deser(version, payload).map(Self::HEARTBEAT),
34923            HIGHRES_IMU_DATA::ID => {
34924                HIGHRES_IMU_DATA::deser(version, payload).map(Self::HIGHRES_IMU)
34925            }
34926            HIGH_LATENCY_DATA::ID => {
34927                HIGH_LATENCY_DATA::deser(version, payload).map(Self::HIGH_LATENCY)
34928            }
34929            HIGH_LATENCY2_DATA::ID => {
34930                HIGH_LATENCY2_DATA::deser(version, payload).map(Self::HIGH_LATENCY2)
34931            }
34932            HIL_ACTUATOR_CONTROLS_DATA::ID => {
34933                HIL_ACTUATOR_CONTROLS_DATA::deser(version, payload).map(Self::HIL_ACTUATOR_CONTROLS)
34934            }
34935            HIL_CONTROLS_DATA::ID => {
34936                HIL_CONTROLS_DATA::deser(version, payload).map(Self::HIL_CONTROLS)
34937            }
34938            HIL_GPS_DATA::ID => HIL_GPS_DATA::deser(version, payload).map(Self::HIL_GPS),
34939            HIL_OPTICAL_FLOW_DATA::ID => {
34940                HIL_OPTICAL_FLOW_DATA::deser(version, payload).map(Self::HIL_OPTICAL_FLOW)
34941            }
34942            HIL_RC_INPUTS_RAW_DATA::ID => {
34943                HIL_RC_INPUTS_RAW_DATA::deser(version, payload).map(Self::HIL_RC_INPUTS_RAW)
34944            }
34945            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::deser(version, payload).map(Self::HIL_SENSOR),
34946            HIL_STATE_DATA::ID => HIL_STATE_DATA::deser(version, payload).map(Self::HIL_STATE),
34947            HIL_STATE_QUATERNION_DATA::ID => {
34948                HIL_STATE_QUATERNION_DATA::deser(version, payload).map(Self::HIL_STATE_QUATERNION)
34949            }
34950            HOME_POSITION_DATA::ID => {
34951                HOME_POSITION_DATA::deser(version, payload).map(Self::HOME_POSITION)
34952            }
34953            HYGROMETER_SENSOR_DATA::ID => {
34954                HYGROMETER_SENSOR_DATA::deser(version, payload).map(Self::HYGROMETER_SENSOR)
34955            }
34956            ILLUMINATOR_STATUS_DATA::ID => {
34957                ILLUMINATOR_STATUS_DATA::deser(version, payload).map(Self::ILLUMINATOR_STATUS)
34958            }
34959            ISBD_LINK_STATUS_DATA::ID => {
34960                ISBD_LINK_STATUS_DATA::deser(version, payload).map(Self::ISBD_LINK_STATUS)
34961            }
34962            LANDING_TARGET_DATA::ID => {
34963                LANDING_TARGET_DATA::deser(version, payload).map(Self::LANDING_TARGET)
34964            }
34965            LINK_NODE_STATUS_DATA::ID => {
34966                LINK_NODE_STATUS_DATA::deser(version, payload).map(Self::LINK_NODE_STATUS)
34967            }
34968            LOCAL_POSITION_NED_DATA::ID => {
34969                LOCAL_POSITION_NED_DATA::deser(version, payload).map(Self::LOCAL_POSITION_NED)
34970            }
34971            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::deser(version, payload)
34972                .map(Self::LOCAL_POSITION_NED_COV),
34973            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
34974                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::deser(version, payload)
34975                    .map(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET)
34976            }
34977            LOGGING_ACK_DATA::ID => {
34978                LOGGING_ACK_DATA::deser(version, payload).map(Self::LOGGING_ACK)
34979            }
34980            LOGGING_DATA_DATA::ID => {
34981                LOGGING_DATA_DATA::deser(version, payload).map(Self::LOGGING_DATA)
34982            }
34983            LOGGING_DATA_ACKED_DATA::ID => {
34984                LOGGING_DATA_ACKED_DATA::deser(version, payload).map(Self::LOGGING_DATA_ACKED)
34985            }
34986            LOG_DATA_DATA::ID => LOG_DATA_DATA::deser(version, payload).map(Self::LOG_DATA),
34987            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::deser(version, payload).map(Self::LOG_ENTRY),
34988            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::deser(version, payload).map(Self::LOG_ERASE),
34989            LOG_REQUEST_DATA_DATA::ID => {
34990                LOG_REQUEST_DATA_DATA::deser(version, payload).map(Self::LOG_REQUEST_DATA)
34991            }
34992            LOG_REQUEST_END_DATA::ID => {
34993                LOG_REQUEST_END_DATA::deser(version, payload).map(Self::LOG_REQUEST_END)
34994            }
34995            LOG_REQUEST_LIST_DATA::ID => {
34996                LOG_REQUEST_LIST_DATA::deser(version, payload).map(Self::LOG_REQUEST_LIST)
34997            }
34998            MAG_CAL_REPORT_DATA::ID => {
34999                MAG_CAL_REPORT_DATA::deser(version, payload).map(Self::MAG_CAL_REPORT)
35000            }
35001            MANUAL_CONTROL_DATA::ID => {
35002                MANUAL_CONTROL_DATA::deser(version, payload).map(Self::MANUAL_CONTROL)
35003            }
35004            MANUAL_SETPOINT_DATA::ID => {
35005                MANUAL_SETPOINT_DATA::deser(version, payload).map(Self::MANUAL_SETPOINT)
35006            }
35007            MEMORY_VECT_DATA::ID => {
35008                MEMORY_VECT_DATA::deser(version, payload).map(Self::MEMORY_VECT)
35009            }
35010            MESSAGE_INTERVAL_DATA::ID => {
35011                MESSAGE_INTERVAL_DATA::deser(version, payload).map(Self::MESSAGE_INTERVAL)
35012            }
35013            MISSION_ACK_DATA::ID => {
35014                MISSION_ACK_DATA::deser(version, payload).map(Self::MISSION_ACK)
35015            }
35016            MISSION_CLEAR_ALL_DATA::ID => {
35017                MISSION_CLEAR_ALL_DATA::deser(version, payload).map(Self::MISSION_CLEAR_ALL)
35018            }
35019            MISSION_COUNT_DATA::ID => {
35020                MISSION_COUNT_DATA::deser(version, payload).map(Self::MISSION_COUNT)
35021            }
35022            MISSION_CURRENT_DATA::ID => {
35023                MISSION_CURRENT_DATA::deser(version, payload).map(Self::MISSION_CURRENT)
35024            }
35025            MISSION_ITEM_DATA::ID => {
35026                MISSION_ITEM_DATA::deser(version, payload).map(Self::MISSION_ITEM)
35027            }
35028            MISSION_ITEM_INT_DATA::ID => {
35029                MISSION_ITEM_INT_DATA::deser(version, payload).map(Self::MISSION_ITEM_INT)
35030            }
35031            MISSION_ITEM_REACHED_DATA::ID => {
35032                MISSION_ITEM_REACHED_DATA::deser(version, payload).map(Self::MISSION_ITEM_REACHED)
35033            }
35034            MISSION_REQUEST_DATA::ID => {
35035                MISSION_REQUEST_DATA::deser(version, payload).map(Self::MISSION_REQUEST)
35036            }
35037            MISSION_REQUEST_INT_DATA::ID => {
35038                MISSION_REQUEST_INT_DATA::deser(version, payload).map(Self::MISSION_REQUEST_INT)
35039            }
35040            MISSION_REQUEST_LIST_DATA::ID => {
35041                MISSION_REQUEST_LIST_DATA::deser(version, payload).map(Self::MISSION_REQUEST_LIST)
35042            }
35043            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => {
35044                MISSION_REQUEST_PARTIAL_LIST_DATA::deser(version, payload)
35045                    .map(Self::MISSION_REQUEST_PARTIAL_LIST)
35046            }
35047            MISSION_SET_CURRENT_DATA::ID => {
35048                MISSION_SET_CURRENT_DATA::deser(version, payload).map(Self::MISSION_SET_CURRENT)
35049            }
35050            MISSION_WRITE_PARTIAL_LIST_DATA::ID => {
35051                MISSION_WRITE_PARTIAL_LIST_DATA::deser(version, payload)
35052                    .map(Self::MISSION_WRITE_PARTIAL_LIST)
35053            }
35054            MOUNT_ORIENTATION_DATA::ID => {
35055                MOUNT_ORIENTATION_DATA::deser(version, payload).map(Self::MOUNT_ORIENTATION)
35056            }
35057            NAMED_VALUE_FLOAT_DATA::ID => {
35058                NAMED_VALUE_FLOAT_DATA::deser(version, payload).map(Self::NAMED_VALUE_FLOAT)
35059            }
35060            NAMED_VALUE_INT_DATA::ID => {
35061                NAMED_VALUE_INT_DATA::deser(version, payload).map(Self::NAMED_VALUE_INT)
35062            }
35063            NAV_CONTROLLER_OUTPUT_DATA::ID => {
35064                NAV_CONTROLLER_OUTPUT_DATA::deser(version, payload).map(Self::NAV_CONTROLLER_OUTPUT)
35065            }
35066            OBSTACLE_DISTANCE_DATA::ID => {
35067                OBSTACLE_DISTANCE_DATA::deser(version, payload).map(Self::OBSTACLE_DISTANCE)
35068            }
35069            ODOMETRY_DATA::ID => ODOMETRY_DATA::deser(version, payload).map(Self::ODOMETRY),
35070            ONBOARD_COMPUTER_STATUS_DATA::ID => {
35071                ONBOARD_COMPUTER_STATUS_DATA::deser(version, payload)
35072                    .map(Self::ONBOARD_COMPUTER_STATUS)
35073            }
35074            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => {
35075                OPEN_DRONE_ID_ARM_STATUS_DATA::deser(version, payload)
35076                    .map(Self::OPEN_DRONE_ID_ARM_STATUS)
35077            }
35078            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => {
35079                OPEN_DRONE_ID_AUTHENTICATION_DATA::deser(version, payload)
35080                    .map(Self::OPEN_DRONE_ID_AUTHENTICATION)
35081            }
35082            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::deser(version, payload)
35083                .map(Self::OPEN_DRONE_ID_BASIC_ID),
35084            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::deser(version, payload)
35085                .map(Self::OPEN_DRONE_ID_LOCATION),
35086            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => {
35087                OPEN_DRONE_ID_MESSAGE_PACK_DATA::deser(version, payload)
35088                    .map(Self::OPEN_DRONE_ID_MESSAGE_PACK)
35089            }
35090            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => {
35091                OPEN_DRONE_ID_OPERATOR_ID_DATA::deser(version, payload)
35092                    .map(Self::OPEN_DRONE_ID_OPERATOR_ID)
35093            }
35094            OPEN_DRONE_ID_SELF_ID_DATA::ID => {
35095                OPEN_DRONE_ID_SELF_ID_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SELF_ID)
35096            }
35097            OPEN_DRONE_ID_SYSTEM_DATA::ID => {
35098                OPEN_DRONE_ID_SYSTEM_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SYSTEM)
35099            }
35100            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => {
35101                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::deser(version, payload)
35102                    .map(Self::OPEN_DRONE_ID_SYSTEM_UPDATE)
35103            }
35104            OPTICAL_FLOW_DATA::ID => {
35105                OPTICAL_FLOW_DATA::deser(version, payload).map(Self::OPTICAL_FLOW)
35106            }
35107            OPTICAL_FLOW_RAD_DATA::ID => {
35108                OPTICAL_FLOW_RAD_DATA::deser(version, payload).map(Self::OPTICAL_FLOW_RAD)
35109            }
35110            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::deser(version, payload)
35111                .map(Self::ORBIT_EXECUTION_STATUS),
35112            PARAM_EXT_ACK_DATA::ID => {
35113                PARAM_EXT_ACK_DATA::deser(version, payload).map(Self::PARAM_EXT_ACK)
35114            }
35115            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::deser(version, payload)
35116                .map(Self::PARAM_EXT_REQUEST_LIST),
35117            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::deser(version, payload)
35118                .map(Self::PARAM_EXT_REQUEST_READ),
35119            PARAM_EXT_SET_DATA::ID => {
35120                PARAM_EXT_SET_DATA::deser(version, payload).map(Self::PARAM_EXT_SET)
35121            }
35122            PARAM_EXT_VALUE_DATA::ID => {
35123                PARAM_EXT_VALUE_DATA::deser(version, payload).map(Self::PARAM_EXT_VALUE)
35124            }
35125            PARAM_MAP_RC_DATA::ID => {
35126                PARAM_MAP_RC_DATA::deser(version, payload).map(Self::PARAM_MAP_RC)
35127            }
35128            PARAM_REQUEST_LIST_DATA::ID => {
35129                PARAM_REQUEST_LIST_DATA::deser(version, payload).map(Self::PARAM_REQUEST_LIST)
35130            }
35131            PARAM_REQUEST_READ_DATA::ID => {
35132                PARAM_REQUEST_READ_DATA::deser(version, payload).map(Self::PARAM_REQUEST_READ)
35133            }
35134            PARAM_SET_DATA::ID => PARAM_SET_DATA::deser(version, payload).map(Self::PARAM_SET),
35135            PARAM_VALUE_DATA::ID => {
35136                PARAM_VALUE_DATA::deser(version, payload).map(Self::PARAM_VALUE)
35137            }
35138            PING_DATA::ID => PING_DATA::deser(version, payload).map(Self::PING),
35139            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::deser(version, payload).map(Self::PLAY_TUNE),
35140            PLAY_TUNE_V2_DATA::ID => {
35141                PLAY_TUNE_V2_DATA::deser(version, payload).map(Self::PLAY_TUNE_V2)
35142            }
35143            POSITION_TARGET_GLOBAL_INT_DATA::ID => {
35144                POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
35145                    .map(Self::POSITION_TARGET_GLOBAL_INT)
35146            }
35147            POSITION_TARGET_LOCAL_NED_DATA::ID => {
35148                POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
35149                    .map(Self::POSITION_TARGET_LOCAL_NED)
35150            }
35151            POWER_STATUS_DATA::ID => {
35152                POWER_STATUS_DATA::deser(version, payload).map(Self::POWER_STATUS)
35153            }
35154            PROTOCOL_VERSION_DATA::ID => {
35155                PROTOCOL_VERSION_DATA::deser(version, payload).map(Self::PROTOCOL_VERSION)
35156            }
35157            RADIO_RC_CHANNELS_DATA::ID => {
35158                RADIO_RC_CHANNELS_DATA::deser(version, payload).map(Self::RADIO_RC_CHANNELS)
35159            }
35160            RADIO_STATUS_DATA::ID => {
35161                RADIO_STATUS_DATA::deser(version, payload).map(Self::RADIO_STATUS)
35162            }
35163            RAW_IMU_DATA::ID => RAW_IMU_DATA::deser(version, payload).map(Self::RAW_IMU),
35164            RAW_PRESSURE_DATA::ID => {
35165                RAW_PRESSURE_DATA::deser(version, payload).map(Self::RAW_PRESSURE)
35166            }
35167            RAW_RPM_DATA::ID => RAW_RPM_DATA::deser(version, payload).map(Self::RAW_RPM),
35168            RC_CHANNELS_DATA::ID => {
35169                RC_CHANNELS_DATA::deser(version, payload).map(Self::RC_CHANNELS)
35170            }
35171            RC_CHANNELS_OVERRIDE_DATA::ID => {
35172                RC_CHANNELS_OVERRIDE_DATA::deser(version, payload).map(Self::RC_CHANNELS_OVERRIDE)
35173            }
35174            RC_CHANNELS_RAW_DATA::ID => {
35175                RC_CHANNELS_RAW_DATA::deser(version, payload).map(Self::RC_CHANNELS_RAW)
35176            }
35177            RC_CHANNELS_SCALED_DATA::ID => {
35178                RC_CHANNELS_SCALED_DATA::deser(version, payload).map(Self::RC_CHANNELS_SCALED)
35179            }
35180            REQUEST_DATA_STREAM_DATA::ID => {
35181                REQUEST_DATA_STREAM_DATA::deser(version, payload).map(Self::REQUEST_DATA_STREAM)
35182            }
35183            REQUEST_EVENT_DATA::ID => {
35184                REQUEST_EVENT_DATA::deser(version, payload).map(Self::REQUEST_EVENT)
35185            }
35186            RESOURCE_REQUEST_DATA::ID => {
35187                RESOURCE_REQUEST_DATA::deser(version, payload).map(Self::RESOURCE_REQUEST)
35188            }
35189            RESPONSE_EVENT_ERROR_DATA::ID => {
35190                RESPONSE_EVENT_ERROR_DATA::deser(version, payload).map(Self::RESPONSE_EVENT_ERROR)
35191            }
35192            SAFETY_ALLOWED_AREA_DATA::ID => {
35193                SAFETY_ALLOWED_AREA_DATA::deser(version, payload).map(Self::SAFETY_ALLOWED_AREA)
35194            }
35195            SAFETY_SET_ALLOWED_AREA_DATA::ID => {
35196                SAFETY_SET_ALLOWED_AREA_DATA::deser(version, payload)
35197                    .map(Self::SAFETY_SET_ALLOWED_AREA)
35198            }
35199            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::deser(version, payload).map(Self::SCALED_IMU),
35200            SCALED_IMU2_DATA::ID => {
35201                SCALED_IMU2_DATA::deser(version, payload).map(Self::SCALED_IMU2)
35202            }
35203            SCALED_IMU3_DATA::ID => {
35204                SCALED_IMU3_DATA::deser(version, payload).map(Self::SCALED_IMU3)
35205            }
35206            SCALED_PRESSURE_DATA::ID => {
35207                SCALED_PRESSURE_DATA::deser(version, payload).map(Self::SCALED_PRESSURE)
35208            }
35209            SCALED_PRESSURE2_DATA::ID => {
35210                SCALED_PRESSURE2_DATA::deser(version, payload).map(Self::SCALED_PRESSURE2)
35211            }
35212            SCALED_PRESSURE3_DATA::ID => {
35213                SCALED_PRESSURE3_DATA::deser(version, payload).map(Self::SCALED_PRESSURE3)
35214            }
35215            SERIAL_CONTROL_DATA::ID => {
35216                SERIAL_CONTROL_DATA::deser(version, payload).map(Self::SERIAL_CONTROL)
35217            }
35218            SERVO_OUTPUT_RAW_DATA::ID => {
35219                SERVO_OUTPUT_RAW_DATA::deser(version, payload).map(Self::SERVO_OUTPUT_RAW)
35220            }
35221            SETUP_SIGNING_DATA::ID => {
35222                SETUP_SIGNING_DATA::deser(version, payload).map(Self::SETUP_SIGNING)
35223            }
35224            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => {
35225                SET_ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
35226                    .map(Self::SET_ACTUATOR_CONTROL_TARGET)
35227            }
35228            SET_ATTITUDE_TARGET_DATA::ID => {
35229                SET_ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::SET_ATTITUDE_TARGET)
35230            }
35231            SET_GPS_GLOBAL_ORIGIN_DATA::ID => {
35232                SET_GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::SET_GPS_GLOBAL_ORIGIN)
35233            }
35234            SET_HOME_POSITION_DATA::ID => {
35235                SET_HOME_POSITION_DATA::deser(version, payload).map(Self::SET_HOME_POSITION)
35236            }
35237            SET_MODE_DATA::ID => SET_MODE_DATA::deser(version, payload).map(Self::SET_MODE),
35238            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
35239                SET_POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
35240                    .map(Self::SET_POSITION_TARGET_GLOBAL_INT)
35241            }
35242            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => {
35243                SET_POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
35244                    .map(Self::SET_POSITION_TARGET_LOCAL_NED)
35245            }
35246            SET_VELOCITY_LIMITS_DATA::ID => {
35247                SET_VELOCITY_LIMITS_DATA::deser(version, payload).map(Self::SET_VELOCITY_LIMITS)
35248            }
35249            SIM_STATE_DATA::ID => SIM_STATE_DATA::deser(version, payload).map(Self::SIM_STATE),
35250            SMART_BATTERY_INFO_DATA::ID => {
35251                SMART_BATTERY_INFO_DATA::deser(version, payload).map(Self::SMART_BATTERY_INFO)
35252            }
35253            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::deser(version, payload).map(Self::STATUSTEXT),
35254            STORAGE_INFORMATION_DATA::ID => {
35255                STORAGE_INFORMATION_DATA::deser(version, payload).map(Self::STORAGE_INFORMATION)
35256            }
35257            SUPPORTED_TUNES_DATA::ID => {
35258                SUPPORTED_TUNES_DATA::deser(version, payload).map(Self::SUPPORTED_TUNES)
35259            }
35260            SYSTEM_TIME_DATA::ID => {
35261                SYSTEM_TIME_DATA::deser(version, payload).map(Self::SYSTEM_TIME)
35262            }
35263            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::deser(version, payload).map(Self::SYS_STATUS),
35264            TARGET_ABSOLUTE_DATA::ID => {
35265                TARGET_ABSOLUTE_DATA::deser(version, payload).map(Self::TARGET_ABSOLUTE)
35266            }
35267            TARGET_RELATIVE_DATA::ID => {
35268                TARGET_RELATIVE_DATA::deser(version, payload).map(Self::TARGET_RELATIVE)
35269            }
35270            TERRAIN_CHECK_DATA::ID => {
35271                TERRAIN_CHECK_DATA::deser(version, payload).map(Self::TERRAIN_CHECK)
35272            }
35273            TERRAIN_DATA_DATA::ID => {
35274                TERRAIN_DATA_DATA::deser(version, payload).map(Self::TERRAIN_DATA)
35275            }
35276            TERRAIN_REPORT_DATA::ID => {
35277                TERRAIN_REPORT_DATA::deser(version, payload).map(Self::TERRAIN_REPORT)
35278            }
35279            TERRAIN_REQUEST_DATA::ID => {
35280                TERRAIN_REQUEST_DATA::deser(version, payload).map(Self::TERRAIN_REQUEST)
35281            }
35282            TIMESYNC_DATA::ID => TIMESYNC_DATA::deser(version, payload).map(Self::TIMESYNC),
35283            TIME_ESTIMATE_TO_TARGET_DATA::ID => {
35284                TIME_ESTIMATE_TO_TARGET_DATA::deser(version, payload)
35285                    .map(Self::TIME_ESTIMATE_TO_TARGET)
35286            }
35287            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
35288                TRAJECTORY_REPRESENTATION_BEZIER_DATA::deser(version, payload)
35289                    .map(Self::TRAJECTORY_REPRESENTATION_BEZIER)
35290            }
35291            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
35292                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::deser(version, payload)
35293                    .map(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS)
35294            }
35295            TUNNEL_DATA::ID => TUNNEL_DATA::deser(version, payload).map(Self::TUNNEL),
35296            UAVCAN_NODE_INFO_DATA::ID => {
35297                UAVCAN_NODE_INFO_DATA::deser(version, payload).map(Self::UAVCAN_NODE_INFO)
35298            }
35299            UAVCAN_NODE_STATUS_DATA::ID => {
35300                UAVCAN_NODE_STATUS_DATA::deser(version, payload).map(Self::UAVCAN_NODE_STATUS)
35301            }
35302            UTM_GLOBAL_POSITION_DATA::ID => {
35303                UTM_GLOBAL_POSITION_DATA::deser(version, payload).map(Self::UTM_GLOBAL_POSITION)
35304            }
35305            V2_EXTENSION_DATA::ID => {
35306                V2_EXTENSION_DATA::deser(version, payload).map(Self::V2_EXTENSION)
35307            }
35308            VELOCITY_LIMITS_DATA::ID => {
35309                VELOCITY_LIMITS_DATA::deser(version, payload).map(Self::VELOCITY_LIMITS)
35310            }
35311            VFR_HUD_DATA::ID => VFR_HUD_DATA::deser(version, payload).map(Self::VFR_HUD),
35312            VIBRATION_DATA::ID => VIBRATION_DATA::deser(version, payload).map(Self::VIBRATION),
35313            VICON_POSITION_ESTIMATE_DATA::ID => {
35314                VICON_POSITION_ESTIMATE_DATA::deser(version, payload)
35315                    .map(Self::VICON_POSITION_ESTIMATE)
35316            }
35317            VIDEO_STREAM_INFORMATION_DATA::ID => {
35318                VIDEO_STREAM_INFORMATION_DATA::deser(version, payload)
35319                    .map(Self::VIDEO_STREAM_INFORMATION)
35320            }
35321            VIDEO_STREAM_STATUS_DATA::ID => {
35322                VIDEO_STREAM_STATUS_DATA::deser(version, payload).map(Self::VIDEO_STREAM_STATUS)
35323            }
35324            VISION_POSITION_ESTIMATE_DATA::ID => {
35325                VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
35326                    .map(Self::VISION_POSITION_ESTIMATE)
35327            }
35328            VISION_SPEED_ESTIMATE_DATA::ID => {
35329                VISION_SPEED_ESTIMATE_DATA::deser(version, payload).map(Self::VISION_SPEED_ESTIMATE)
35330            }
35331            WHEEL_DISTANCE_DATA::ID => {
35332                WHEEL_DISTANCE_DATA::deser(version, payload).map(Self::WHEEL_DISTANCE)
35333            }
35334            WIFI_CONFIG_AP_DATA::ID => {
35335                WIFI_CONFIG_AP_DATA::deser(version, payload).map(Self::WIFI_CONFIG_AP)
35336            }
35337            WINCH_STATUS_DATA::ID => {
35338                WINCH_STATUS_DATA::deser(version, payload).map(Self::WINCH_STATUS)
35339            }
35340            WIND_COV_DATA::ID => WIND_COV_DATA::deser(version, payload).map(Self::WIND_COV),
35341            _ => Err(::mavlink_core::error::ParserError::UnknownMessage { id }),
35342        }
35343    }
35344    fn message_name(&self) -> &'static str {
35345        match self {
35346            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::NAME,
35347            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::NAME,
35348            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::NAME,
35349            Self::AIRSPEED(..) => AIRSPEED_DATA::NAME,
35350            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::NAME,
35351            Self::ALTITUDE(..) => ALTITUDE_DATA::NAME,
35352            Self::ATTITUDE(..) => ATTITUDE_DATA::NAME,
35353            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::NAME,
35354            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::NAME,
35355            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::NAME,
35356            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::NAME,
35357            Self::AUTH_KEY(..) => AUTH_KEY_DATA::NAME,
35358            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
35359                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME
35360            }
35361            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::NAME,
35362            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::NAME,
35363            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::NAME,
35364            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::NAME,
35365            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::NAME,
35366            Self::BATTERY_STATUS_V2(..) => BATTERY_STATUS_V2_DATA::NAME,
35367            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::NAME,
35368            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::NAME,
35369            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::NAME,
35370            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::NAME,
35371            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::NAME,
35372            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::NAME,
35373            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::NAME,
35374            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::NAME,
35375            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME,
35376            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::NAME,
35377            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::NAME,
35378            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::NAME,
35379            Self::CAN_FRAME(..) => CAN_FRAME_DATA::NAME,
35380            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::NAME,
35381            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::NAME,
35382            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::NAME,
35383            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME,
35384            Self::COLLISION(..) => COLLISION_DATA::NAME,
35385            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::NAME,
35386            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::NAME,
35387            Self::COMMAND_INT(..) => COMMAND_INT_DATA::NAME,
35388            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::NAME,
35389            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::NAME,
35390            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::NAME,
35391            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::NAME,
35392            Self::CONTROL_STATUS(..) => CONTROL_STATUS_DATA::NAME,
35393            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::NAME,
35394            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::NAME,
35395            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::NAME,
35396            Self::DATA_STREAM(..) => DATA_STREAM_DATA::NAME,
35397            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::NAME,
35398            Self::DEBUG(..) => DEBUG_DATA::NAME,
35399            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::NAME,
35400            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::NAME,
35401            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::NAME,
35402            Self::EFI_STATUS(..) => EFI_STATUS_DATA::NAME,
35403            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::NAME,
35404            Self::ESC_INFO(..) => ESC_INFO_DATA::NAME,
35405            Self::ESC_STATUS(..) => ESC_STATUS_DATA::NAME,
35406            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::NAME,
35407            Self::EVENT(..) => EVENT_DATA::NAME,
35408            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::NAME,
35409            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::NAME,
35410            Self::FIGURE_EIGHT_EXECUTION_STATUS(..) => FIGURE_EIGHT_EXECUTION_STATUS_DATA::NAME,
35411            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::NAME,
35412            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::NAME,
35413            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::NAME,
35414            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::NAME,
35415            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::NAME,
35416            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME,
35417            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::NAME,
35418            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME,
35419            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::NAME,
35420            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME,
35421            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
35422                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME
35423            }
35424            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME,
35425            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::NAME,
35426            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::NAME,
35427            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::NAME,
35428            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME,
35429            Self::GNSS_INTEGRITY(..) => GNSS_INTEGRITY_DATA::NAME,
35430            Self::GPS2_RAW(..) => GPS2_RAW_DATA::NAME,
35431            Self::GPS2_RTK(..) => GPS2_RTK_DATA::NAME,
35432            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::NAME,
35433            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::NAME,
35434            Self::GPS_INPUT(..) => GPS_INPUT_DATA::NAME,
35435            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::NAME,
35436            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::NAME,
35437            Self::GPS_RTK(..) => GPS_RTK_DATA::NAME,
35438            Self::GPS_STATUS(..) => GPS_STATUS_DATA::NAME,
35439            Self::GROUP_END(..) => GROUP_END_DATA::NAME,
35440            Self::GROUP_START(..) => GROUP_START_DATA::NAME,
35441            Self::HEARTBEAT(..) => HEARTBEAT_DATA::NAME,
35442            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::NAME,
35443            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::NAME,
35444            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::NAME,
35445            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::NAME,
35446            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::NAME,
35447            Self::HIL_GPS(..) => HIL_GPS_DATA::NAME,
35448            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::NAME,
35449            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::NAME,
35450            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::NAME,
35451            Self::HIL_STATE(..) => HIL_STATE_DATA::NAME,
35452            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::NAME,
35453            Self::HOME_POSITION(..) => HOME_POSITION_DATA::NAME,
35454            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::NAME,
35455            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::NAME,
35456            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::NAME,
35457            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::NAME,
35458            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::NAME,
35459            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::NAME,
35460            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::NAME,
35461            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
35462                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME
35463            }
35464            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::NAME,
35465            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::NAME,
35466            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::NAME,
35467            Self::LOG_DATA(..) => LOG_DATA_DATA::NAME,
35468            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::NAME,
35469            Self::LOG_ERASE(..) => LOG_ERASE_DATA::NAME,
35470            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::NAME,
35471            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::NAME,
35472            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::NAME,
35473            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::NAME,
35474            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::NAME,
35475            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::NAME,
35476            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::NAME,
35477            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::NAME,
35478            Self::MISSION_ACK(..) => MISSION_ACK_DATA::NAME,
35479            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::NAME,
35480            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::NAME,
35481            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::NAME,
35482            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::NAME,
35483            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::NAME,
35484            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::NAME,
35485            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::NAME,
35486            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::NAME,
35487            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::NAME,
35488            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::NAME,
35489            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::NAME,
35490            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::NAME,
35491            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::NAME,
35492            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::NAME,
35493            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::NAME,
35494            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::NAME,
35495            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::NAME,
35496            Self::ODOMETRY(..) => ODOMETRY_DATA::NAME,
35497            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::NAME,
35498            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::NAME,
35499            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME,
35500            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::NAME,
35501            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::NAME,
35502            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME,
35503            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME,
35504            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::NAME,
35505            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::NAME,
35506            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME,
35507            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::NAME,
35508            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::NAME,
35509            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::NAME,
35510            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::NAME,
35511            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::NAME,
35512            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::NAME,
35513            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::NAME,
35514            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::NAME,
35515            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::NAME,
35516            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::NAME,
35517            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::NAME,
35518            Self::PARAM_SET(..) => PARAM_SET_DATA::NAME,
35519            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::NAME,
35520            Self::PING(..) => PING_DATA::NAME,
35521            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::NAME,
35522            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::NAME,
35523            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::NAME,
35524            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::NAME,
35525            Self::POWER_STATUS(..) => POWER_STATUS_DATA::NAME,
35526            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::NAME,
35527            Self::RADIO_RC_CHANNELS(..) => RADIO_RC_CHANNELS_DATA::NAME,
35528            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::NAME,
35529            Self::RAW_IMU(..) => RAW_IMU_DATA::NAME,
35530            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::NAME,
35531            Self::RAW_RPM(..) => RAW_RPM_DATA::NAME,
35532            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::NAME,
35533            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::NAME,
35534            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::NAME,
35535            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::NAME,
35536            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::NAME,
35537            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::NAME,
35538            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::NAME,
35539            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::NAME,
35540            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::NAME,
35541            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::NAME,
35542            Self::SCALED_IMU(..) => SCALED_IMU_DATA::NAME,
35543            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::NAME,
35544            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::NAME,
35545            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::NAME,
35546            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::NAME,
35547            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::NAME,
35548            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::NAME,
35549            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::NAME,
35550            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::NAME,
35551            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::NAME,
35552            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::NAME,
35553            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::NAME,
35554            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::NAME,
35555            Self::SET_MODE(..) => SET_MODE_DATA::NAME,
35556            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME,
35557            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::NAME,
35558            Self::SET_VELOCITY_LIMITS(..) => SET_VELOCITY_LIMITS_DATA::NAME,
35559            Self::SIM_STATE(..) => SIM_STATE_DATA::NAME,
35560            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::NAME,
35561            Self::STATUSTEXT(..) => STATUSTEXT_DATA::NAME,
35562            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::NAME,
35563            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::NAME,
35564            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::NAME,
35565            Self::SYS_STATUS(..) => SYS_STATUS_DATA::NAME,
35566            Self::TARGET_ABSOLUTE(..) => TARGET_ABSOLUTE_DATA::NAME,
35567            Self::TARGET_RELATIVE(..) => TARGET_RELATIVE_DATA::NAME,
35568            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::NAME,
35569            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::NAME,
35570            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::NAME,
35571            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::NAME,
35572            Self::TIMESYNC(..) => TIMESYNC_DATA::NAME,
35573            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::NAME,
35574            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => {
35575                TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME
35576            }
35577            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
35578                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME
35579            }
35580            Self::TUNNEL(..) => TUNNEL_DATA::NAME,
35581            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::NAME,
35582            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::NAME,
35583            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::NAME,
35584            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::NAME,
35585            Self::VELOCITY_LIMITS(..) => VELOCITY_LIMITS_DATA::NAME,
35586            Self::VFR_HUD(..) => VFR_HUD_DATA::NAME,
35587            Self::VIBRATION(..) => VIBRATION_DATA::NAME,
35588            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::NAME,
35589            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::NAME,
35590            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::NAME,
35591            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::NAME,
35592            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::NAME,
35593            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::NAME,
35594            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::NAME,
35595            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::NAME,
35596            Self::WIND_COV(..) => WIND_COV_DATA::NAME,
35597        }
35598    }
35599    fn message_id(&self) -> u32 {
35600        match self {
35601            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::ID,
35602            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::ID,
35603            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::ID,
35604            Self::AIRSPEED(..) => AIRSPEED_DATA::ID,
35605            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::ID,
35606            Self::ALTITUDE(..) => ALTITUDE_DATA::ID,
35607            Self::ATTITUDE(..) => ATTITUDE_DATA::ID,
35608            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::ID,
35609            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::ID,
35610            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::ID,
35611            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::ID,
35612            Self::AUTH_KEY(..) => AUTH_KEY_DATA::ID,
35613            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
35614                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID
35615            }
35616            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::ID,
35617            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::ID,
35618            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::ID,
35619            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::ID,
35620            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::ID,
35621            Self::BATTERY_STATUS_V2(..) => BATTERY_STATUS_V2_DATA::ID,
35622            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::ID,
35623            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::ID,
35624            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::ID,
35625            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::ID,
35626            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::ID,
35627            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::ID,
35628            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::ID,
35629            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::ID,
35630            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::ID,
35631            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::ID,
35632            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::ID,
35633            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::ID,
35634            Self::CAN_FRAME(..) => CAN_FRAME_DATA::ID,
35635            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::ID,
35636            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::ID,
35637            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::ID,
35638            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::ID,
35639            Self::COLLISION(..) => COLLISION_DATA::ID,
35640            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::ID,
35641            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::ID,
35642            Self::COMMAND_INT(..) => COMMAND_INT_DATA::ID,
35643            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::ID,
35644            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::ID,
35645            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::ID,
35646            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::ID,
35647            Self::CONTROL_STATUS(..) => CONTROL_STATUS_DATA::ID,
35648            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::ID,
35649            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::ID,
35650            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::ID,
35651            Self::DATA_STREAM(..) => DATA_STREAM_DATA::ID,
35652            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::ID,
35653            Self::DEBUG(..) => DEBUG_DATA::ID,
35654            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::ID,
35655            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::ID,
35656            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::ID,
35657            Self::EFI_STATUS(..) => EFI_STATUS_DATA::ID,
35658            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::ID,
35659            Self::ESC_INFO(..) => ESC_INFO_DATA::ID,
35660            Self::ESC_STATUS(..) => ESC_STATUS_DATA::ID,
35661            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::ID,
35662            Self::EVENT(..) => EVENT_DATA::ID,
35663            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::ID,
35664            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::ID,
35665            Self::FIGURE_EIGHT_EXECUTION_STATUS(..) => FIGURE_EIGHT_EXECUTION_STATUS_DATA::ID,
35666            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::ID,
35667            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::ID,
35668            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::ID,
35669            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::ID,
35670            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::ID,
35671            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID,
35672            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::ID,
35673            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID,
35674            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::ID,
35675            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID,
35676            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
35677                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID
35678            }
35679            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID,
35680            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::ID,
35681            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::ID,
35682            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::ID,
35683            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID,
35684            Self::GNSS_INTEGRITY(..) => GNSS_INTEGRITY_DATA::ID,
35685            Self::GPS2_RAW(..) => GPS2_RAW_DATA::ID,
35686            Self::GPS2_RTK(..) => GPS2_RTK_DATA::ID,
35687            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::ID,
35688            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::ID,
35689            Self::GPS_INPUT(..) => GPS_INPUT_DATA::ID,
35690            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::ID,
35691            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::ID,
35692            Self::GPS_RTK(..) => GPS_RTK_DATA::ID,
35693            Self::GPS_STATUS(..) => GPS_STATUS_DATA::ID,
35694            Self::GROUP_END(..) => GROUP_END_DATA::ID,
35695            Self::GROUP_START(..) => GROUP_START_DATA::ID,
35696            Self::HEARTBEAT(..) => HEARTBEAT_DATA::ID,
35697            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::ID,
35698            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::ID,
35699            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::ID,
35700            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::ID,
35701            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::ID,
35702            Self::HIL_GPS(..) => HIL_GPS_DATA::ID,
35703            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::ID,
35704            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::ID,
35705            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::ID,
35706            Self::HIL_STATE(..) => HIL_STATE_DATA::ID,
35707            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::ID,
35708            Self::HOME_POSITION(..) => HOME_POSITION_DATA::ID,
35709            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::ID,
35710            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::ID,
35711            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::ID,
35712            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::ID,
35713            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::ID,
35714            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::ID,
35715            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::ID,
35716            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
35717                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID
35718            }
35719            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::ID,
35720            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::ID,
35721            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::ID,
35722            Self::LOG_DATA(..) => LOG_DATA_DATA::ID,
35723            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::ID,
35724            Self::LOG_ERASE(..) => LOG_ERASE_DATA::ID,
35725            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::ID,
35726            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::ID,
35727            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::ID,
35728            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::ID,
35729            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::ID,
35730            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::ID,
35731            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::ID,
35732            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::ID,
35733            Self::MISSION_ACK(..) => MISSION_ACK_DATA::ID,
35734            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::ID,
35735            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::ID,
35736            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::ID,
35737            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::ID,
35738            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::ID,
35739            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::ID,
35740            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::ID,
35741            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::ID,
35742            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::ID,
35743            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::ID,
35744            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::ID,
35745            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::ID,
35746            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::ID,
35747            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::ID,
35748            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::ID,
35749            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::ID,
35750            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::ID,
35751            Self::ODOMETRY(..) => ODOMETRY_DATA::ID,
35752            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::ID,
35753            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::ID,
35754            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::ID,
35755            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::ID,
35756            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::ID,
35757            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID,
35758            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::ID,
35759            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::ID,
35760            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::ID,
35761            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID,
35762            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::ID,
35763            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::ID,
35764            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::ID,
35765            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::ID,
35766            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::ID,
35767            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::ID,
35768            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::ID,
35769            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::ID,
35770            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::ID,
35771            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::ID,
35772            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::ID,
35773            Self::PARAM_SET(..) => PARAM_SET_DATA::ID,
35774            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::ID,
35775            Self::PING(..) => PING_DATA::ID,
35776            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::ID,
35777            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::ID,
35778            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::ID,
35779            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::ID,
35780            Self::POWER_STATUS(..) => POWER_STATUS_DATA::ID,
35781            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::ID,
35782            Self::RADIO_RC_CHANNELS(..) => RADIO_RC_CHANNELS_DATA::ID,
35783            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::ID,
35784            Self::RAW_IMU(..) => RAW_IMU_DATA::ID,
35785            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::ID,
35786            Self::RAW_RPM(..) => RAW_RPM_DATA::ID,
35787            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::ID,
35788            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::ID,
35789            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::ID,
35790            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::ID,
35791            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::ID,
35792            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::ID,
35793            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::ID,
35794            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::ID,
35795            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::ID,
35796            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::ID,
35797            Self::SCALED_IMU(..) => SCALED_IMU_DATA::ID,
35798            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::ID,
35799            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::ID,
35800            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::ID,
35801            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::ID,
35802            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::ID,
35803            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::ID,
35804            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::ID,
35805            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::ID,
35806            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::ID,
35807            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::ID,
35808            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::ID,
35809            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::ID,
35810            Self::SET_MODE(..) => SET_MODE_DATA::ID,
35811            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::ID,
35812            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::ID,
35813            Self::SET_VELOCITY_LIMITS(..) => SET_VELOCITY_LIMITS_DATA::ID,
35814            Self::SIM_STATE(..) => SIM_STATE_DATA::ID,
35815            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::ID,
35816            Self::STATUSTEXT(..) => STATUSTEXT_DATA::ID,
35817            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::ID,
35818            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::ID,
35819            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::ID,
35820            Self::SYS_STATUS(..) => SYS_STATUS_DATA::ID,
35821            Self::TARGET_ABSOLUTE(..) => TARGET_ABSOLUTE_DATA::ID,
35822            Self::TARGET_RELATIVE(..) => TARGET_RELATIVE_DATA::ID,
35823            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::ID,
35824            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::ID,
35825            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::ID,
35826            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::ID,
35827            Self::TIMESYNC(..) => TIMESYNC_DATA::ID,
35828            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::ID,
35829            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID,
35830            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
35831                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID
35832            }
35833            Self::TUNNEL(..) => TUNNEL_DATA::ID,
35834            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::ID,
35835            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::ID,
35836            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::ID,
35837            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::ID,
35838            Self::VELOCITY_LIMITS(..) => VELOCITY_LIMITS_DATA::ID,
35839            Self::VFR_HUD(..) => VFR_HUD_DATA::ID,
35840            Self::VIBRATION(..) => VIBRATION_DATA::ID,
35841            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::ID,
35842            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::ID,
35843            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::ID,
35844            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::ID,
35845            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::ID,
35846            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::ID,
35847            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::ID,
35848            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::ID,
35849            Self::WIND_COV(..) => WIND_COV_DATA::ID,
35850        }
35851    }
35852    fn message_id_from_name(name: &str) -> Option<u32> {
35853        match name {
35854            ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(ACTUATOR_CONTROL_TARGET_DATA::ID),
35855            ACTUATOR_OUTPUT_STATUS_DATA::NAME => Some(ACTUATOR_OUTPUT_STATUS_DATA::ID),
35856            ADSB_VEHICLE_DATA::NAME => Some(ADSB_VEHICLE_DATA::ID),
35857            AIRSPEED_DATA::NAME => Some(AIRSPEED_DATA::ID),
35858            AIS_VESSEL_DATA::NAME => Some(AIS_VESSEL_DATA::ID),
35859            ALTITUDE_DATA::NAME => Some(ALTITUDE_DATA::ID),
35860            ATTITUDE_DATA::NAME => Some(ATTITUDE_DATA::ID),
35861            ATTITUDE_QUATERNION_DATA::NAME => Some(ATTITUDE_QUATERNION_DATA::ID),
35862            ATTITUDE_QUATERNION_COV_DATA::NAME => Some(ATTITUDE_QUATERNION_COV_DATA::ID),
35863            ATTITUDE_TARGET_DATA::NAME => Some(ATTITUDE_TARGET_DATA::ID),
35864            ATT_POS_MOCAP_DATA::NAME => Some(ATT_POS_MOCAP_DATA::ID),
35865            AUTH_KEY_DATA::NAME => Some(AUTH_KEY_DATA::ID),
35866            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME => {
35867                Some(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID)
35868            }
35869            AUTOPILOT_VERSION_DATA::NAME => Some(AUTOPILOT_VERSION_DATA::ID),
35870            AVAILABLE_MODES_DATA::NAME => Some(AVAILABLE_MODES_DATA::ID),
35871            AVAILABLE_MODES_MONITOR_DATA::NAME => Some(AVAILABLE_MODES_MONITOR_DATA::ID),
35872            BATTERY_INFO_DATA::NAME => Some(BATTERY_INFO_DATA::ID),
35873            BATTERY_STATUS_DATA::NAME => Some(BATTERY_STATUS_DATA::ID),
35874            BATTERY_STATUS_V2_DATA::NAME => Some(BATTERY_STATUS_V2_DATA::ID),
35875            BUTTON_CHANGE_DATA::NAME => Some(BUTTON_CHANGE_DATA::ID),
35876            CAMERA_CAPTURE_STATUS_DATA::NAME => Some(CAMERA_CAPTURE_STATUS_DATA::ID),
35877            CAMERA_FOV_STATUS_DATA::NAME => Some(CAMERA_FOV_STATUS_DATA::ID),
35878            CAMERA_IMAGE_CAPTURED_DATA::NAME => Some(CAMERA_IMAGE_CAPTURED_DATA::ID),
35879            CAMERA_INFORMATION_DATA::NAME => Some(CAMERA_INFORMATION_DATA::ID),
35880            CAMERA_SETTINGS_DATA::NAME => Some(CAMERA_SETTINGS_DATA::ID),
35881            CAMERA_THERMAL_RANGE_DATA::NAME => Some(CAMERA_THERMAL_RANGE_DATA::ID),
35882            CAMERA_TRACKING_GEO_STATUS_DATA::NAME => Some(CAMERA_TRACKING_GEO_STATUS_DATA::ID),
35883            CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME => Some(CAMERA_TRACKING_IMAGE_STATUS_DATA::ID),
35884            CAMERA_TRIGGER_DATA::NAME => Some(CAMERA_TRIGGER_DATA::ID),
35885            CANFD_FRAME_DATA::NAME => Some(CANFD_FRAME_DATA::ID),
35886            CAN_FILTER_MODIFY_DATA::NAME => Some(CAN_FILTER_MODIFY_DATA::ID),
35887            CAN_FRAME_DATA::NAME => Some(CAN_FRAME_DATA::ID),
35888            CELLULAR_CONFIG_DATA::NAME => Some(CELLULAR_CONFIG_DATA::ID),
35889            CELLULAR_STATUS_DATA::NAME => Some(CELLULAR_STATUS_DATA::ID),
35890            CHANGE_OPERATOR_CONTROL_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_DATA::ID),
35891            CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_ACK_DATA::ID),
35892            COLLISION_DATA::NAME => Some(COLLISION_DATA::ID),
35893            COMMAND_ACK_DATA::NAME => Some(COMMAND_ACK_DATA::ID),
35894            COMMAND_CANCEL_DATA::NAME => Some(COMMAND_CANCEL_DATA::ID),
35895            COMMAND_INT_DATA::NAME => Some(COMMAND_INT_DATA::ID),
35896            COMMAND_LONG_DATA::NAME => Some(COMMAND_LONG_DATA::ID),
35897            COMPONENT_INFORMATION_DATA::NAME => Some(COMPONENT_INFORMATION_DATA::ID),
35898            COMPONENT_INFORMATION_BASIC_DATA::NAME => Some(COMPONENT_INFORMATION_BASIC_DATA::ID),
35899            COMPONENT_METADATA_DATA::NAME => Some(COMPONENT_METADATA_DATA::ID),
35900            CONTROL_STATUS_DATA::NAME => Some(CONTROL_STATUS_DATA::ID),
35901            CONTROL_SYSTEM_STATE_DATA::NAME => Some(CONTROL_SYSTEM_STATE_DATA::ID),
35902            CURRENT_EVENT_SEQUENCE_DATA::NAME => Some(CURRENT_EVENT_SEQUENCE_DATA::ID),
35903            CURRENT_MODE_DATA::NAME => Some(CURRENT_MODE_DATA::ID),
35904            DATA_STREAM_DATA::NAME => Some(DATA_STREAM_DATA::ID),
35905            DATA_TRANSMISSION_HANDSHAKE_DATA::NAME => Some(DATA_TRANSMISSION_HANDSHAKE_DATA::ID),
35906            DEBUG_DATA::NAME => Some(DEBUG_DATA::ID),
35907            DEBUG_FLOAT_ARRAY_DATA::NAME => Some(DEBUG_FLOAT_ARRAY_DATA::ID),
35908            DEBUG_VECT_DATA::NAME => Some(DEBUG_VECT_DATA::ID),
35909            DISTANCE_SENSOR_DATA::NAME => Some(DISTANCE_SENSOR_DATA::ID),
35910            EFI_STATUS_DATA::NAME => Some(EFI_STATUS_DATA::ID),
35911            ENCAPSULATED_DATA_DATA::NAME => Some(ENCAPSULATED_DATA_DATA::ID),
35912            ESC_INFO_DATA::NAME => Some(ESC_INFO_DATA::ID),
35913            ESC_STATUS_DATA::NAME => Some(ESC_STATUS_DATA::ID),
35914            ESTIMATOR_STATUS_DATA::NAME => Some(ESTIMATOR_STATUS_DATA::ID),
35915            EVENT_DATA::NAME => Some(EVENT_DATA::ID),
35916            EXTENDED_SYS_STATE_DATA::NAME => Some(EXTENDED_SYS_STATE_DATA::ID),
35917            FENCE_STATUS_DATA::NAME => Some(FENCE_STATUS_DATA::ID),
35918            FIGURE_EIGHT_EXECUTION_STATUS_DATA::NAME => {
35919                Some(FIGURE_EIGHT_EXECUTION_STATUS_DATA::ID)
35920            }
35921            FILE_TRANSFER_PROTOCOL_DATA::NAME => Some(FILE_TRANSFER_PROTOCOL_DATA::ID),
35922            FLIGHT_INFORMATION_DATA::NAME => Some(FLIGHT_INFORMATION_DATA::ID),
35923            FOLLOW_TARGET_DATA::NAME => Some(FOLLOW_TARGET_DATA::ID),
35924            FUEL_STATUS_DATA::NAME => Some(FUEL_STATUS_DATA::ID),
35925            GENERATOR_STATUS_DATA::NAME => Some(GENERATOR_STATUS_DATA::ID),
35926            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME => {
35927                Some(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID)
35928            }
35929            GIMBAL_DEVICE_INFORMATION_DATA::NAME => Some(GIMBAL_DEVICE_INFORMATION_DATA::ID),
35930            GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID),
35931            GIMBAL_MANAGER_INFORMATION_DATA::NAME => Some(GIMBAL_MANAGER_INFORMATION_DATA::ID),
35932            GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID),
35933            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME => {
35934                Some(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID)
35935            }
35936            GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME => Some(GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID),
35937            GIMBAL_MANAGER_STATUS_DATA::NAME => Some(GIMBAL_MANAGER_STATUS_DATA::ID),
35938            GLOBAL_POSITION_INT_DATA::NAME => Some(GLOBAL_POSITION_INT_DATA::ID),
35939            GLOBAL_POSITION_INT_COV_DATA::NAME => Some(GLOBAL_POSITION_INT_COV_DATA::ID),
35940            GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME => {
35941                Some(GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID)
35942            }
35943            GNSS_INTEGRITY_DATA::NAME => Some(GNSS_INTEGRITY_DATA::ID),
35944            GPS2_RAW_DATA::NAME => Some(GPS2_RAW_DATA::ID),
35945            GPS2_RTK_DATA::NAME => Some(GPS2_RTK_DATA::ID),
35946            GPS_GLOBAL_ORIGIN_DATA::NAME => Some(GPS_GLOBAL_ORIGIN_DATA::ID),
35947            GPS_INJECT_DATA_DATA::NAME => Some(GPS_INJECT_DATA_DATA::ID),
35948            GPS_INPUT_DATA::NAME => Some(GPS_INPUT_DATA::ID),
35949            GPS_RAW_INT_DATA::NAME => Some(GPS_RAW_INT_DATA::ID),
35950            GPS_RTCM_DATA_DATA::NAME => Some(GPS_RTCM_DATA_DATA::ID),
35951            GPS_RTK_DATA::NAME => Some(GPS_RTK_DATA::ID),
35952            GPS_STATUS_DATA::NAME => Some(GPS_STATUS_DATA::ID),
35953            GROUP_END_DATA::NAME => Some(GROUP_END_DATA::ID),
35954            GROUP_START_DATA::NAME => Some(GROUP_START_DATA::ID),
35955            HEARTBEAT_DATA::NAME => Some(HEARTBEAT_DATA::ID),
35956            HIGHRES_IMU_DATA::NAME => Some(HIGHRES_IMU_DATA::ID),
35957            HIGH_LATENCY_DATA::NAME => Some(HIGH_LATENCY_DATA::ID),
35958            HIGH_LATENCY2_DATA::NAME => Some(HIGH_LATENCY2_DATA::ID),
35959            HIL_ACTUATOR_CONTROLS_DATA::NAME => Some(HIL_ACTUATOR_CONTROLS_DATA::ID),
35960            HIL_CONTROLS_DATA::NAME => Some(HIL_CONTROLS_DATA::ID),
35961            HIL_GPS_DATA::NAME => Some(HIL_GPS_DATA::ID),
35962            HIL_OPTICAL_FLOW_DATA::NAME => Some(HIL_OPTICAL_FLOW_DATA::ID),
35963            HIL_RC_INPUTS_RAW_DATA::NAME => Some(HIL_RC_INPUTS_RAW_DATA::ID),
35964            HIL_SENSOR_DATA::NAME => Some(HIL_SENSOR_DATA::ID),
35965            HIL_STATE_DATA::NAME => Some(HIL_STATE_DATA::ID),
35966            HIL_STATE_QUATERNION_DATA::NAME => Some(HIL_STATE_QUATERNION_DATA::ID),
35967            HOME_POSITION_DATA::NAME => Some(HOME_POSITION_DATA::ID),
35968            HYGROMETER_SENSOR_DATA::NAME => Some(HYGROMETER_SENSOR_DATA::ID),
35969            ILLUMINATOR_STATUS_DATA::NAME => Some(ILLUMINATOR_STATUS_DATA::ID),
35970            ISBD_LINK_STATUS_DATA::NAME => Some(ISBD_LINK_STATUS_DATA::ID),
35971            LANDING_TARGET_DATA::NAME => Some(LANDING_TARGET_DATA::ID),
35972            LINK_NODE_STATUS_DATA::NAME => Some(LINK_NODE_STATUS_DATA::ID),
35973            LOCAL_POSITION_NED_DATA::NAME => Some(LOCAL_POSITION_NED_DATA::ID),
35974            LOCAL_POSITION_NED_COV_DATA::NAME => Some(LOCAL_POSITION_NED_COV_DATA::ID),
35975            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME => {
35976                Some(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID)
35977            }
35978            LOGGING_ACK_DATA::NAME => Some(LOGGING_ACK_DATA::ID),
35979            LOGGING_DATA_DATA::NAME => Some(LOGGING_DATA_DATA::ID),
35980            LOGGING_DATA_ACKED_DATA::NAME => Some(LOGGING_DATA_ACKED_DATA::ID),
35981            LOG_DATA_DATA::NAME => Some(LOG_DATA_DATA::ID),
35982            LOG_ENTRY_DATA::NAME => Some(LOG_ENTRY_DATA::ID),
35983            LOG_ERASE_DATA::NAME => Some(LOG_ERASE_DATA::ID),
35984            LOG_REQUEST_DATA_DATA::NAME => Some(LOG_REQUEST_DATA_DATA::ID),
35985            LOG_REQUEST_END_DATA::NAME => Some(LOG_REQUEST_END_DATA::ID),
35986            LOG_REQUEST_LIST_DATA::NAME => Some(LOG_REQUEST_LIST_DATA::ID),
35987            MAG_CAL_REPORT_DATA::NAME => Some(MAG_CAL_REPORT_DATA::ID),
35988            MANUAL_CONTROL_DATA::NAME => Some(MANUAL_CONTROL_DATA::ID),
35989            MANUAL_SETPOINT_DATA::NAME => Some(MANUAL_SETPOINT_DATA::ID),
35990            MEMORY_VECT_DATA::NAME => Some(MEMORY_VECT_DATA::ID),
35991            MESSAGE_INTERVAL_DATA::NAME => Some(MESSAGE_INTERVAL_DATA::ID),
35992            MISSION_ACK_DATA::NAME => Some(MISSION_ACK_DATA::ID),
35993            MISSION_CLEAR_ALL_DATA::NAME => Some(MISSION_CLEAR_ALL_DATA::ID),
35994            MISSION_COUNT_DATA::NAME => Some(MISSION_COUNT_DATA::ID),
35995            MISSION_CURRENT_DATA::NAME => Some(MISSION_CURRENT_DATA::ID),
35996            MISSION_ITEM_DATA::NAME => Some(MISSION_ITEM_DATA::ID),
35997            MISSION_ITEM_INT_DATA::NAME => Some(MISSION_ITEM_INT_DATA::ID),
35998            MISSION_ITEM_REACHED_DATA::NAME => Some(MISSION_ITEM_REACHED_DATA::ID),
35999            MISSION_REQUEST_DATA::NAME => Some(MISSION_REQUEST_DATA::ID),
36000            MISSION_REQUEST_INT_DATA::NAME => Some(MISSION_REQUEST_INT_DATA::ID),
36001            MISSION_REQUEST_LIST_DATA::NAME => Some(MISSION_REQUEST_LIST_DATA::ID),
36002            MISSION_REQUEST_PARTIAL_LIST_DATA::NAME => Some(MISSION_REQUEST_PARTIAL_LIST_DATA::ID),
36003            MISSION_SET_CURRENT_DATA::NAME => Some(MISSION_SET_CURRENT_DATA::ID),
36004            MISSION_WRITE_PARTIAL_LIST_DATA::NAME => Some(MISSION_WRITE_PARTIAL_LIST_DATA::ID),
36005            MOUNT_ORIENTATION_DATA::NAME => Some(MOUNT_ORIENTATION_DATA::ID),
36006            NAMED_VALUE_FLOAT_DATA::NAME => Some(NAMED_VALUE_FLOAT_DATA::ID),
36007            NAMED_VALUE_INT_DATA::NAME => Some(NAMED_VALUE_INT_DATA::ID),
36008            NAV_CONTROLLER_OUTPUT_DATA::NAME => Some(NAV_CONTROLLER_OUTPUT_DATA::ID),
36009            OBSTACLE_DISTANCE_DATA::NAME => Some(OBSTACLE_DISTANCE_DATA::ID),
36010            ODOMETRY_DATA::NAME => Some(ODOMETRY_DATA::ID),
36011            ONBOARD_COMPUTER_STATUS_DATA::NAME => Some(ONBOARD_COMPUTER_STATUS_DATA::ID),
36012            OPEN_DRONE_ID_ARM_STATUS_DATA::NAME => Some(OPEN_DRONE_ID_ARM_STATUS_DATA::ID),
36013            OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME => Some(OPEN_DRONE_ID_AUTHENTICATION_DATA::ID),
36014            OPEN_DRONE_ID_BASIC_ID_DATA::NAME => Some(OPEN_DRONE_ID_BASIC_ID_DATA::ID),
36015            OPEN_DRONE_ID_LOCATION_DATA::NAME => Some(OPEN_DRONE_ID_LOCATION_DATA::ID),
36016            OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME => Some(OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID),
36017            OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME => Some(OPEN_DRONE_ID_OPERATOR_ID_DATA::ID),
36018            OPEN_DRONE_ID_SELF_ID_DATA::NAME => Some(OPEN_DRONE_ID_SELF_ID_DATA::ID),
36019            OPEN_DRONE_ID_SYSTEM_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_DATA::ID),
36020            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID),
36021            OPTICAL_FLOW_DATA::NAME => Some(OPTICAL_FLOW_DATA::ID),
36022            OPTICAL_FLOW_RAD_DATA::NAME => Some(OPTICAL_FLOW_RAD_DATA::ID),
36023            ORBIT_EXECUTION_STATUS_DATA::NAME => Some(ORBIT_EXECUTION_STATUS_DATA::ID),
36024            PARAM_EXT_ACK_DATA::NAME => Some(PARAM_EXT_ACK_DATA::ID),
36025            PARAM_EXT_REQUEST_LIST_DATA::NAME => Some(PARAM_EXT_REQUEST_LIST_DATA::ID),
36026            PARAM_EXT_REQUEST_READ_DATA::NAME => Some(PARAM_EXT_REQUEST_READ_DATA::ID),
36027            PARAM_EXT_SET_DATA::NAME => Some(PARAM_EXT_SET_DATA::ID),
36028            PARAM_EXT_VALUE_DATA::NAME => Some(PARAM_EXT_VALUE_DATA::ID),
36029            PARAM_MAP_RC_DATA::NAME => Some(PARAM_MAP_RC_DATA::ID),
36030            PARAM_REQUEST_LIST_DATA::NAME => Some(PARAM_REQUEST_LIST_DATA::ID),
36031            PARAM_REQUEST_READ_DATA::NAME => Some(PARAM_REQUEST_READ_DATA::ID),
36032            PARAM_SET_DATA::NAME => Some(PARAM_SET_DATA::ID),
36033            PARAM_VALUE_DATA::NAME => Some(PARAM_VALUE_DATA::ID),
36034            PING_DATA::NAME => Some(PING_DATA::ID),
36035            PLAY_TUNE_DATA::NAME => Some(PLAY_TUNE_DATA::ID),
36036            PLAY_TUNE_V2_DATA::NAME => Some(PLAY_TUNE_V2_DATA::ID),
36037            POSITION_TARGET_GLOBAL_INT_DATA::NAME => Some(POSITION_TARGET_GLOBAL_INT_DATA::ID),
36038            POSITION_TARGET_LOCAL_NED_DATA::NAME => Some(POSITION_TARGET_LOCAL_NED_DATA::ID),
36039            POWER_STATUS_DATA::NAME => Some(POWER_STATUS_DATA::ID),
36040            PROTOCOL_VERSION_DATA::NAME => Some(PROTOCOL_VERSION_DATA::ID),
36041            RADIO_RC_CHANNELS_DATA::NAME => Some(RADIO_RC_CHANNELS_DATA::ID),
36042            RADIO_STATUS_DATA::NAME => Some(RADIO_STATUS_DATA::ID),
36043            RAW_IMU_DATA::NAME => Some(RAW_IMU_DATA::ID),
36044            RAW_PRESSURE_DATA::NAME => Some(RAW_PRESSURE_DATA::ID),
36045            RAW_RPM_DATA::NAME => Some(RAW_RPM_DATA::ID),
36046            RC_CHANNELS_DATA::NAME => Some(RC_CHANNELS_DATA::ID),
36047            RC_CHANNELS_OVERRIDE_DATA::NAME => Some(RC_CHANNELS_OVERRIDE_DATA::ID),
36048            RC_CHANNELS_RAW_DATA::NAME => Some(RC_CHANNELS_RAW_DATA::ID),
36049            RC_CHANNELS_SCALED_DATA::NAME => Some(RC_CHANNELS_SCALED_DATA::ID),
36050            REQUEST_DATA_STREAM_DATA::NAME => Some(REQUEST_DATA_STREAM_DATA::ID),
36051            REQUEST_EVENT_DATA::NAME => Some(REQUEST_EVENT_DATA::ID),
36052            RESOURCE_REQUEST_DATA::NAME => Some(RESOURCE_REQUEST_DATA::ID),
36053            RESPONSE_EVENT_ERROR_DATA::NAME => Some(RESPONSE_EVENT_ERROR_DATA::ID),
36054            SAFETY_ALLOWED_AREA_DATA::NAME => Some(SAFETY_ALLOWED_AREA_DATA::ID),
36055            SAFETY_SET_ALLOWED_AREA_DATA::NAME => Some(SAFETY_SET_ALLOWED_AREA_DATA::ID),
36056            SCALED_IMU_DATA::NAME => Some(SCALED_IMU_DATA::ID),
36057            SCALED_IMU2_DATA::NAME => Some(SCALED_IMU2_DATA::ID),
36058            SCALED_IMU3_DATA::NAME => Some(SCALED_IMU3_DATA::ID),
36059            SCALED_PRESSURE_DATA::NAME => Some(SCALED_PRESSURE_DATA::ID),
36060            SCALED_PRESSURE2_DATA::NAME => Some(SCALED_PRESSURE2_DATA::ID),
36061            SCALED_PRESSURE3_DATA::NAME => Some(SCALED_PRESSURE3_DATA::ID),
36062            SERIAL_CONTROL_DATA::NAME => Some(SERIAL_CONTROL_DATA::ID),
36063            SERVO_OUTPUT_RAW_DATA::NAME => Some(SERVO_OUTPUT_RAW_DATA::ID),
36064            SETUP_SIGNING_DATA::NAME => Some(SETUP_SIGNING_DATA::ID),
36065            SET_ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(SET_ACTUATOR_CONTROL_TARGET_DATA::ID),
36066            SET_ATTITUDE_TARGET_DATA::NAME => Some(SET_ATTITUDE_TARGET_DATA::ID),
36067            SET_GPS_GLOBAL_ORIGIN_DATA::NAME => Some(SET_GPS_GLOBAL_ORIGIN_DATA::ID),
36068            SET_HOME_POSITION_DATA::NAME => Some(SET_HOME_POSITION_DATA::ID),
36069            SET_MODE_DATA::NAME => Some(SET_MODE_DATA::ID),
36070            SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME => {
36071                Some(SET_POSITION_TARGET_GLOBAL_INT_DATA::ID)
36072            }
36073            SET_POSITION_TARGET_LOCAL_NED_DATA::NAME => {
36074                Some(SET_POSITION_TARGET_LOCAL_NED_DATA::ID)
36075            }
36076            SET_VELOCITY_LIMITS_DATA::NAME => Some(SET_VELOCITY_LIMITS_DATA::ID),
36077            SIM_STATE_DATA::NAME => Some(SIM_STATE_DATA::ID),
36078            SMART_BATTERY_INFO_DATA::NAME => Some(SMART_BATTERY_INFO_DATA::ID),
36079            STATUSTEXT_DATA::NAME => Some(STATUSTEXT_DATA::ID),
36080            STORAGE_INFORMATION_DATA::NAME => Some(STORAGE_INFORMATION_DATA::ID),
36081            SUPPORTED_TUNES_DATA::NAME => Some(SUPPORTED_TUNES_DATA::ID),
36082            SYSTEM_TIME_DATA::NAME => Some(SYSTEM_TIME_DATA::ID),
36083            SYS_STATUS_DATA::NAME => Some(SYS_STATUS_DATA::ID),
36084            TARGET_ABSOLUTE_DATA::NAME => Some(TARGET_ABSOLUTE_DATA::ID),
36085            TARGET_RELATIVE_DATA::NAME => Some(TARGET_RELATIVE_DATA::ID),
36086            TERRAIN_CHECK_DATA::NAME => Some(TERRAIN_CHECK_DATA::ID),
36087            TERRAIN_DATA_DATA::NAME => Some(TERRAIN_DATA_DATA::ID),
36088            TERRAIN_REPORT_DATA::NAME => Some(TERRAIN_REPORT_DATA::ID),
36089            TERRAIN_REQUEST_DATA::NAME => Some(TERRAIN_REQUEST_DATA::ID),
36090            TIMESYNC_DATA::NAME => Some(TIMESYNC_DATA::ID),
36091            TIME_ESTIMATE_TO_TARGET_DATA::NAME => Some(TIME_ESTIMATE_TO_TARGET_DATA::ID),
36092            TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME => {
36093                Some(TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID)
36094            }
36095            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME => {
36096                Some(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID)
36097            }
36098            TUNNEL_DATA::NAME => Some(TUNNEL_DATA::ID),
36099            UAVCAN_NODE_INFO_DATA::NAME => Some(UAVCAN_NODE_INFO_DATA::ID),
36100            UAVCAN_NODE_STATUS_DATA::NAME => Some(UAVCAN_NODE_STATUS_DATA::ID),
36101            UTM_GLOBAL_POSITION_DATA::NAME => Some(UTM_GLOBAL_POSITION_DATA::ID),
36102            V2_EXTENSION_DATA::NAME => Some(V2_EXTENSION_DATA::ID),
36103            VELOCITY_LIMITS_DATA::NAME => Some(VELOCITY_LIMITS_DATA::ID),
36104            VFR_HUD_DATA::NAME => Some(VFR_HUD_DATA::ID),
36105            VIBRATION_DATA::NAME => Some(VIBRATION_DATA::ID),
36106            VICON_POSITION_ESTIMATE_DATA::NAME => Some(VICON_POSITION_ESTIMATE_DATA::ID),
36107            VIDEO_STREAM_INFORMATION_DATA::NAME => Some(VIDEO_STREAM_INFORMATION_DATA::ID),
36108            VIDEO_STREAM_STATUS_DATA::NAME => Some(VIDEO_STREAM_STATUS_DATA::ID),
36109            VISION_POSITION_ESTIMATE_DATA::NAME => Some(VISION_POSITION_ESTIMATE_DATA::ID),
36110            VISION_SPEED_ESTIMATE_DATA::NAME => Some(VISION_SPEED_ESTIMATE_DATA::ID),
36111            WHEEL_DISTANCE_DATA::NAME => Some(WHEEL_DISTANCE_DATA::ID),
36112            WIFI_CONFIG_AP_DATA::NAME => Some(WIFI_CONFIG_AP_DATA::ID),
36113            WINCH_STATUS_DATA::NAME => Some(WINCH_STATUS_DATA::ID),
36114            WIND_COV_DATA::NAME => Some(WIND_COV_DATA::ID),
36115            _ => None,
36116        }
36117    }
36118    fn default_message_from_id(id: u32) -> Option<Self> {
36119        match id {
36120            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
36121                ACTUATOR_CONTROL_TARGET_DATA::default(),
36122            )),
36123            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
36124                ACTUATOR_OUTPUT_STATUS_DATA::default(),
36125            )),
36126            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::default())),
36127            AIRSPEED_DATA::ID => Some(Self::AIRSPEED(AIRSPEED_DATA::default())),
36128            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::default())),
36129            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::default())),
36130            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::default())),
36131            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
36132                ATTITUDE_QUATERNION_DATA::default(),
36133            )),
36134            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
36135                ATTITUDE_QUATERNION_COV_DATA::default(),
36136            )),
36137            ATTITUDE_TARGET_DATA::ID => {
36138                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::default()))
36139            }
36140            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::default())),
36141            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::default())),
36142            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
36143                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
36144                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::default(),
36145                ))
36146            }
36147            AUTOPILOT_VERSION_DATA::ID => {
36148                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::default()))
36149            }
36150            AVAILABLE_MODES_DATA::ID => {
36151                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::default()))
36152            }
36153            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
36154                AVAILABLE_MODES_MONITOR_DATA::default(),
36155            )),
36156            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::default())),
36157            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::default())),
36158            BATTERY_STATUS_V2_DATA::ID => {
36159                Some(Self::BATTERY_STATUS_V2(BATTERY_STATUS_V2_DATA::default()))
36160            }
36161            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::default())),
36162            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
36163                CAMERA_CAPTURE_STATUS_DATA::default(),
36164            )),
36165            CAMERA_FOV_STATUS_DATA::ID => {
36166                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::default()))
36167            }
36168            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
36169                CAMERA_IMAGE_CAPTURED_DATA::default(),
36170            )),
36171            CAMERA_INFORMATION_DATA::ID => {
36172                Some(Self::CAMERA_INFORMATION(CAMERA_INFORMATION_DATA::default()))
36173            }
36174            CAMERA_SETTINGS_DATA::ID => {
36175                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::default()))
36176            }
36177            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
36178                CAMERA_THERMAL_RANGE_DATA::default(),
36179            )),
36180            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
36181                CAMERA_TRACKING_GEO_STATUS_DATA::default(),
36182            )),
36183            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
36184                CAMERA_TRACKING_IMAGE_STATUS_DATA::default(),
36185            )),
36186            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::default())),
36187            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::default())),
36188            CAN_FILTER_MODIFY_DATA::ID => {
36189                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::default()))
36190            }
36191            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::default())),
36192            CELLULAR_CONFIG_DATA::ID => {
36193                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::default()))
36194            }
36195            CELLULAR_STATUS_DATA::ID => {
36196                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::default()))
36197            }
36198            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
36199                CHANGE_OPERATOR_CONTROL_DATA::default(),
36200            )),
36201            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
36202                CHANGE_OPERATOR_CONTROL_ACK_DATA::default(),
36203            )),
36204            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::default())),
36205            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::default())),
36206            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::default())),
36207            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::default())),
36208            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::default())),
36209            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
36210                COMPONENT_INFORMATION_DATA::default(),
36211            )),
36212            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
36213                COMPONENT_INFORMATION_BASIC_DATA::default(),
36214            )),
36215            COMPONENT_METADATA_DATA::ID => {
36216                Some(Self::COMPONENT_METADATA(COMPONENT_METADATA_DATA::default()))
36217            }
36218            CONTROL_STATUS_DATA::ID => Some(Self::CONTROL_STATUS(CONTROL_STATUS_DATA::default())),
36219            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
36220                CONTROL_SYSTEM_STATE_DATA::default(),
36221            )),
36222            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
36223                CURRENT_EVENT_SEQUENCE_DATA::default(),
36224            )),
36225            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::default())),
36226            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::default())),
36227            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
36228                DATA_TRANSMISSION_HANDSHAKE_DATA::default(),
36229            )),
36230            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::default())),
36231            DEBUG_FLOAT_ARRAY_DATA::ID => {
36232                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::default()))
36233            }
36234            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::default())),
36235            DISTANCE_SENSOR_DATA::ID => {
36236                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::default()))
36237            }
36238            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::default())),
36239            ENCAPSULATED_DATA_DATA::ID => {
36240                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::default()))
36241            }
36242            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::default())),
36243            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::default())),
36244            ESTIMATOR_STATUS_DATA::ID => {
36245                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::default()))
36246            }
36247            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::default())),
36248            EXTENDED_SYS_STATE_DATA::ID => {
36249                Some(Self::EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA::default()))
36250            }
36251            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::default())),
36252            FIGURE_EIGHT_EXECUTION_STATUS_DATA::ID => Some(Self::FIGURE_EIGHT_EXECUTION_STATUS(
36253                FIGURE_EIGHT_EXECUTION_STATUS_DATA::default(),
36254            )),
36255            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
36256                FILE_TRANSFER_PROTOCOL_DATA::default(),
36257            )),
36258            FLIGHT_INFORMATION_DATA::ID => {
36259                Some(Self::FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA::default()))
36260            }
36261            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::default())),
36262            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::default())),
36263            GENERATOR_STATUS_DATA::ID => {
36264                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::default()))
36265            }
36266            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
36267                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::default(),
36268            )),
36269            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
36270                GIMBAL_DEVICE_INFORMATION_DATA::default(),
36271            )),
36272            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
36273                GIMBAL_DEVICE_SET_ATTITUDE_DATA::default(),
36274            )),
36275            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
36276                GIMBAL_MANAGER_INFORMATION_DATA::default(),
36277            )),
36278            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
36279                GIMBAL_MANAGER_SET_ATTITUDE_DATA::default(),
36280            )),
36281            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
36282                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
36283                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::default(),
36284                ))
36285            }
36286            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
36287                GIMBAL_MANAGER_SET_PITCHYAW_DATA::default(),
36288            )),
36289            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
36290                GIMBAL_MANAGER_STATUS_DATA::default(),
36291            )),
36292            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
36293                GLOBAL_POSITION_INT_DATA::default(),
36294            )),
36295            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
36296                GLOBAL_POSITION_INT_COV_DATA::default(),
36297            )),
36298            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
36299                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
36300                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::default(),
36301                ))
36302            }
36303            GNSS_INTEGRITY_DATA::ID => Some(Self::GNSS_INTEGRITY(GNSS_INTEGRITY_DATA::default())),
36304            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::default())),
36305            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::default())),
36306            GPS_GLOBAL_ORIGIN_DATA::ID => {
36307                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::default()))
36308            }
36309            GPS_INJECT_DATA_DATA::ID => {
36310                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::default()))
36311            }
36312            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::default())),
36313            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::default())),
36314            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::default())),
36315            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::default())),
36316            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::default())),
36317            GROUP_END_DATA::ID => Some(Self::GROUP_END(GROUP_END_DATA::default())),
36318            GROUP_START_DATA::ID => Some(Self::GROUP_START(GROUP_START_DATA::default())),
36319            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::default())),
36320            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::default())),
36321            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::default())),
36322            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::default())),
36323            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
36324                HIL_ACTUATOR_CONTROLS_DATA::default(),
36325            )),
36326            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::default())),
36327            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::default())),
36328            HIL_OPTICAL_FLOW_DATA::ID => {
36329                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::default()))
36330            }
36331            HIL_RC_INPUTS_RAW_DATA::ID => {
36332                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::default()))
36333            }
36334            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::default())),
36335            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::default())),
36336            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
36337                HIL_STATE_QUATERNION_DATA::default(),
36338            )),
36339            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::default())),
36340            HYGROMETER_SENSOR_DATA::ID => {
36341                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::default()))
36342            }
36343            ILLUMINATOR_STATUS_DATA::ID => {
36344                Some(Self::ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA::default()))
36345            }
36346            ISBD_LINK_STATUS_DATA::ID => {
36347                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::default()))
36348            }
36349            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::default())),
36350            LINK_NODE_STATUS_DATA::ID => {
36351                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::default()))
36352            }
36353            LOCAL_POSITION_NED_DATA::ID => {
36354                Some(Self::LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA::default()))
36355            }
36356            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
36357                LOCAL_POSITION_NED_COV_DATA::default(),
36358            )),
36359            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
36360                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
36361                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::default(),
36362                ))
36363            }
36364            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::default())),
36365            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::default())),
36366            LOGGING_DATA_ACKED_DATA::ID => {
36367                Some(Self::LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA::default()))
36368            }
36369            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::default())),
36370            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::default())),
36371            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::default())),
36372            LOG_REQUEST_DATA_DATA::ID => {
36373                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::default()))
36374            }
36375            LOG_REQUEST_END_DATA::ID => {
36376                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::default()))
36377            }
36378            LOG_REQUEST_LIST_DATA::ID => {
36379                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::default()))
36380            }
36381            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::default())),
36382            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::default())),
36383            MANUAL_SETPOINT_DATA::ID => {
36384                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::default()))
36385            }
36386            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::default())),
36387            MESSAGE_INTERVAL_DATA::ID => {
36388                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::default()))
36389            }
36390            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::default())),
36391            MISSION_CLEAR_ALL_DATA::ID => {
36392                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::default()))
36393            }
36394            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::default())),
36395            MISSION_CURRENT_DATA::ID => {
36396                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::default()))
36397            }
36398            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::default())),
36399            MISSION_ITEM_INT_DATA::ID => {
36400                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::default()))
36401            }
36402            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
36403                MISSION_ITEM_REACHED_DATA::default(),
36404            )),
36405            MISSION_REQUEST_DATA::ID => {
36406                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::default()))
36407            }
36408            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
36409                MISSION_REQUEST_INT_DATA::default(),
36410            )),
36411            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
36412                MISSION_REQUEST_LIST_DATA::default(),
36413            )),
36414            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
36415                MISSION_REQUEST_PARTIAL_LIST_DATA::default(),
36416            )),
36417            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
36418                MISSION_SET_CURRENT_DATA::default(),
36419            )),
36420            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
36421                MISSION_WRITE_PARTIAL_LIST_DATA::default(),
36422            )),
36423            MOUNT_ORIENTATION_DATA::ID => {
36424                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::default()))
36425            }
36426            NAMED_VALUE_FLOAT_DATA::ID => {
36427                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::default()))
36428            }
36429            NAMED_VALUE_INT_DATA::ID => {
36430                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::default()))
36431            }
36432            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
36433                NAV_CONTROLLER_OUTPUT_DATA::default(),
36434            )),
36435            OBSTACLE_DISTANCE_DATA::ID => {
36436                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::default()))
36437            }
36438            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::default())),
36439            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
36440                ONBOARD_COMPUTER_STATUS_DATA::default(),
36441            )),
36442            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
36443                OPEN_DRONE_ID_ARM_STATUS_DATA::default(),
36444            )),
36445            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
36446                OPEN_DRONE_ID_AUTHENTICATION_DATA::default(),
36447            )),
36448            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
36449                OPEN_DRONE_ID_BASIC_ID_DATA::default(),
36450            )),
36451            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
36452                OPEN_DRONE_ID_LOCATION_DATA::default(),
36453            )),
36454            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
36455                OPEN_DRONE_ID_MESSAGE_PACK_DATA::default(),
36456            )),
36457            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
36458                OPEN_DRONE_ID_OPERATOR_ID_DATA::default(),
36459            )),
36460            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
36461                OPEN_DRONE_ID_SELF_ID_DATA::default(),
36462            )),
36463            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
36464                OPEN_DRONE_ID_SYSTEM_DATA::default(),
36465            )),
36466            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
36467                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::default(),
36468            )),
36469            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::default())),
36470            OPTICAL_FLOW_RAD_DATA::ID => {
36471                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::default()))
36472            }
36473            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
36474                ORBIT_EXECUTION_STATUS_DATA::default(),
36475            )),
36476            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::default())),
36477            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
36478                PARAM_EXT_REQUEST_LIST_DATA::default(),
36479            )),
36480            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
36481                PARAM_EXT_REQUEST_READ_DATA::default(),
36482            )),
36483            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::default())),
36484            PARAM_EXT_VALUE_DATA::ID => {
36485                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::default()))
36486            }
36487            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::default())),
36488            PARAM_REQUEST_LIST_DATA::ID => {
36489                Some(Self::PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA::default()))
36490            }
36491            PARAM_REQUEST_READ_DATA::ID => {
36492                Some(Self::PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA::default()))
36493            }
36494            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::default())),
36495            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::default())),
36496            PING_DATA::ID => Some(Self::PING(PING_DATA::default())),
36497            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::default())),
36498            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::default())),
36499            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
36500                POSITION_TARGET_GLOBAL_INT_DATA::default(),
36501            )),
36502            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
36503                POSITION_TARGET_LOCAL_NED_DATA::default(),
36504            )),
36505            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::default())),
36506            PROTOCOL_VERSION_DATA::ID => {
36507                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::default()))
36508            }
36509            RADIO_RC_CHANNELS_DATA::ID => {
36510                Some(Self::RADIO_RC_CHANNELS(RADIO_RC_CHANNELS_DATA::default()))
36511            }
36512            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::default())),
36513            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::default())),
36514            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::default())),
36515            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::default())),
36516            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::default())),
36517            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
36518                RC_CHANNELS_OVERRIDE_DATA::default(),
36519            )),
36520            RC_CHANNELS_RAW_DATA::ID => {
36521                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::default()))
36522            }
36523            RC_CHANNELS_SCALED_DATA::ID => {
36524                Some(Self::RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA::default()))
36525            }
36526            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
36527                REQUEST_DATA_STREAM_DATA::default(),
36528            )),
36529            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::default())),
36530            RESOURCE_REQUEST_DATA::ID => {
36531                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::default()))
36532            }
36533            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
36534                RESPONSE_EVENT_ERROR_DATA::default(),
36535            )),
36536            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
36537                SAFETY_ALLOWED_AREA_DATA::default(),
36538            )),
36539            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
36540                SAFETY_SET_ALLOWED_AREA_DATA::default(),
36541            )),
36542            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::default())),
36543            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::default())),
36544            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::default())),
36545            SCALED_PRESSURE_DATA::ID => {
36546                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::default()))
36547            }
36548            SCALED_PRESSURE2_DATA::ID => {
36549                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::default()))
36550            }
36551            SCALED_PRESSURE3_DATA::ID => {
36552                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::default()))
36553            }
36554            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::default())),
36555            SERVO_OUTPUT_RAW_DATA::ID => {
36556                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::default()))
36557            }
36558            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::default())),
36559            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
36560                SET_ACTUATOR_CONTROL_TARGET_DATA::default(),
36561            )),
36562            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
36563                SET_ATTITUDE_TARGET_DATA::default(),
36564            )),
36565            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
36566                SET_GPS_GLOBAL_ORIGIN_DATA::default(),
36567            )),
36568            SET_HOME_POSITION_DATA::ID => {
36569                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::default()))
36570            }
36571            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::default())),
36572            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
36573                SET_POSITION_TARGET_GLOBAL_INT_DATA::default(),
36574            )),
36575            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
36576                SET_POSITION_TARGET_LOCAL_NED_DATA::default(),
36577            )),
36578            SET_VELOCITY_LIMITS_DATA::ID => Some(Self::SET_VELOCITY_LIMITS(
36579                SET_VELOCITY_LIMITS_DATA::default(),
36580            )),
36581            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::default())),
36582            SMART_BATTERY_INFO_DATA::ID => {
36583                Some(Self::SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA::default()))
36584            }
36585            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::default())),
36586            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
36587                STORAGE_INFORMATION_DATA::default(),
36588            )),
36589            SUPPORTED_TUNES_DATA::ID => {
36590                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::default()))
36591            }
36592            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::default())),
36593            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::default())),
36594            TARGET_ABSOLUTE_DATA::ID => {
36595                Some(Self::TARGET_ABSOLUTE(TARGET_ABSOLUTE_DATA::default()))
36596            }
36597            TARGET_RELATIVE_DATA::ID => {
36598                Some(Self::TARGET_RELATIVE(TARGET_RELATIVE_DATA::default()))
36599            }
36600            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::default())),
36601            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::default())),
36602            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::default())),
36603            TERRAIN_REQUEST_DATA::ID => {
36604                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::default()))
36605            }
36606            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::default())),
36607            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
36608                TIME_ESTIMATE_TO_TARGET_DATA::default(),
36609            )),
36610            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
36611                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
36612                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::default(),
36613                ))
36614            }
36615            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
36616                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
36617                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::default(),
36618                ))
36619            }
36620            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::default())),
36621            UAVCAN_NODE_INFO_DATA::ID => {
36622                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::default()))
36623            }
36624            UAVCAN_NODE_STATUS_DATA::ID => {
36625                Some(Self::UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA::default()))
36626            }
36627            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
36628                UTM_GLOBAL_POSITION_DATA::default(),
36629            )),
36630            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::default())),
36631            VELOCITY_LIMITS_DATA::ID => {
36632                Some(Self::VELOCITY_LIMITS(VELOCITY_LIMITS_DATA::default()))
36633            }
36634            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::default())),
36635            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::default())),
36636            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
36637                VICON_POSITION_ESTIMATE_DATA::default(),
36638            )),
36639            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
36640                VIDEO_STREAM_INFORMATION_DATA::default(),
36641            )),
36642            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
36643                VIDEO_STREAM_STATUS_DATA::default(),
36644            )),
36645            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
36646                VISION_POSITION_ESTIMATE_DATA::default(),
36647            )),
36648            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
36649                VISION_SPEED_ESTIMATE_DATA::default(),
36650            )),
36651            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::default())),
36652            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::default())),
36653            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::default())),
36654            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::default())),
36655            _ => None,
36656        }
36657    }
36658    #[cfg(feature = "arbitrary")]
36659    fn random_message_from_id<R: rand::RngCore>(id: u32, rng: &mut R) -> Option<Self> {
36660        match id {
36661            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
36662                ACTUATOR_CONTROL_TARGET_DATA::random(rng),
36663            )),
36664            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
36665                ACTUATOR_OUTPUT_STATUS_DATA::random(rng),
36666            )),
36667            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::random(rng))),
36668            AIRSPEED_DATA::ID => Some(Self::AIRSPEED(AIRSPEED_DATA::random(rng))),
36669            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::random(rng))),
36670            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::random(rng))),
36671            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::random(rng))),
36672            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
36673                ATTITUDE_QUATERNION_DATA::random(rng),
36674            )),
36675            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
36676                ATTITUDE_QUATERNION_COV_DATA::random(rng),
36677            )),
36678            ATTITUDE_TARGET_DATA::ID => {
36679                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::random(rng)))
36680            }
36681            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::random(rng))),
36682            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::random(rng))),
36683            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
36684                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
36685                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::random(rng),
36686                ))
36687            }
36688            AUTOPILOT_VERSION_DATA::ID => {
36689                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::random(rng)))
36690            }
36691            AVAILABLE_MODES_DATA::ID => {
36692                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::random(rng)))
36693            }
36694            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
36695                AVAILABLE_MODES_MONITOR_DATA::random(rng),
36696            )),
36697            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::random(rng))),
36698            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::random(rng))),
36699            BATTERY_STATUS_V2_DATA::ID => {
36700                Some(Self::BATTERY_STATUS_V2(BATTERY_STATUS_V2_DATA::random(rng)))
36701            }
36702            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::random(rng))),
36703            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
36704                CAMERA_CAPTURE_STATUS_DATA::random(rng),
36705            )),
36706            CAMERA_FOV_STATUS_DATA::ID => {
36707                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::random(rng)))
36708            }
36709            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
36710                CAMERA_IMAGE_CAPTURED_DATA::random(rng),
36711            )),
36712            CAMERA_INFORMATION_DATA::ID => Some(Self::CAMERA_INFORMATION(
36713                CAMERA_INFORMATION_DATA::random(rng),
36714            )),
36715            CAMERA_SETTINGS_DATA::ID => {
36716                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::random(rng)))
36717            }
36718            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
36719                CAMERA_THERMAL_RANGE_DATA::random(rng),
36720            )),
36721            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
36722                CAMERA_TRACKING_GEO_STATUS_DATA::random(rng),
36723            )),
36724            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
36725                CAMERA_TRACKING_IMAGE_STATUS_DATA::random(rng),
36726            )),
36727            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::random(rng))),
36728            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::random(rng))),
36729            CAN_FILTER_MODIFY_DATA::ID => {
36730                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::random(rng)))
36731            }
36732            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::random(rng))),
36733            CELLULAR_CONFIG_DATA::ID => {
36734                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::random(rng)))
36735            }
36736            CELLULAR_STATUS_DATA::ID => {
36737                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::random(rng)))
36738            }
36739            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
36740                CHANGE_OPERATOR_CONTROL_DATA::random(rng),
36741            )),
36742            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
36743                CHANGE_OPERATOR_CONTROL_ACK_DATA::random(rng),
36744            )),
36745            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::random(rng))),
36746            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::random(rng))),
36747            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::random(rng))),
36748            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::random(rng))),
36749            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::random(rng))),
36750            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
36751                COMPONENT_INFORMATION_DATA::random(rng),
36752            )),
36753            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
36754                COMPONENT_INFORMATION_BASIC_DATA::random(rng),
36755            )),
36756            COMPONENT_METADATA_DATA::ID => Some(Self::COMPONENT_METADATA(
36757                COMPONENT_METADATA_DATA::random(rng),
36758            )),
36759            CONTROL_STATUS_DATA::ID => Some(Self::CONTROL_STATUS(CONTROL_STATUS_DATA::random(rng))),
36760            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
36761                CONTROL_SYSTEM_STATE_DATA::random(rng),
36762            )),
36763            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
36764                CURRENT_EVENT_SEQUENCE_DATA::random(rng),
36765            )),
36766            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::random(rng))),
36767            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::random(rng))),
36768            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
36769                DATA_TRANSMISSION_HANDSHAKE_DATA::random(rng),
36770            )),
36771            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::random(rng))),
36772            DEBUG_FLOAT_ARRAY_DATA::ID => {
36773                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::random(rng)))
36774            }
36775            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::random(rng))),
36776            DISTANCE_SENSOR_DATA::ID => {
36777                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::random(rng)))
36778            }
36779            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::random(rng))),
36780            ENCAPSULATED_DATA_DATA::ID => {
36781                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::random(rng)))
36782            }
36783            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::random(rng))),
36784            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::random(rng))),
36785            ESTIMATOR_STATUS_DATA::ID => {
36786                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::random(rng)))
36787            }
36788            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::random(rng))),
36789            EXTENDED_SYS_STATE_DATA::ID => Some(Self::EXTENDED_SYS_STATE(
36790                EXTENDED_SYS_STATE_DATA::random(rng),
36791            )),
36792            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::random(rng))),
36793            FIGURE_EIGHT_EXECUTION_STATUS_DATA::ID => Some(Self::FIGURE_EIGHT_EXECUTION_STATUS(
36794                FIGURE_EIGHT_EXECUTION_STATUS_DATA::random(rng),
36795            )),
36796            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
36797                FILE_TRANSFER_PROTOCOL_DATA::random(rng),
36798            )),
36799            FLIGHT_INFORMATION_DATA::ID => Some(Self::FLIGHT_INFORMATION(
36800                FLIGHT_INFORMATION_DATA::random(rng),
36801            )),
36802            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::random(rng))),
36803            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::random(rng))),
36804            GENERATOR_STATUS_DATA::ID => {
36805                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::random(rng)))
36806            }
36807            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
36808                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::random(rng),
36809            )),
36810            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
36811                GIMBAL_DEVICE_INFORMATION_DATA::random(rng),
36812            )),
36813            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
36814                GIMBAL_DEVICE_SET_ATTITUDE_DATA::random(rng),
36815            )),
36816            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
36817                GIMBAL_MANAGER_INFORMATION_DATA::random(rng),
36818            )),
36819            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
36820                GIMBAL_MANAGER_SET_ATTITUDE_DATA::random(rng),
36821            )),
36822            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
36823                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
36824                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::random(rng),
36825                ))
36826            }
36827            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
36828                GIMBAL_MANAGER_SET_PITCHYAW_DATA::random(rng),
36829            )),
36830            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
36831                GIMBAL_MANAGER_STATUS_DATA::random(rng),
36832            )),
36833            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
36834                GLOBAL_POSITION_INT_DATA::random(rng),
36835            )),
36836            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
36837                GLOBAL_POSITION_INT_COV_DATA::random(rng),
36838            )),
36839            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
36840                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
36841                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::random(rng),
36842                ))
36843            }
36844            GNSS_INTEGRITY_DATA::ID => Some(Self::GNSS_INTEGRITY(GNSS_INTEGRITY_DATA::random(rng))),
36845            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::random(rng))),
36846            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::random(rng))),
36847            GPS_GLOBAL_ORIGIN_DATA::ID => {
36848                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::random(rng)))
36849            }
36850            GPS_INJECT_DATA_DATA::ID => {
36851                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::random(rng)))
36852            }
36853            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::random(rng))),
36854            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::random(rng))),
36855            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::random(rng))),
36856            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::random(rng))),
36857            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::random(rng))),
36858            GROUP_END_DATA::ID => Some(Self::GROUP_END(GROUP_END_DATA::random(rng))),
36859            GROUP_START_DATA::ID => Some(Self::GROUP_START(GROUP_START_DATA::random(rng))),
36860            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::random(rng))),
36861            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::random(rng))),
36862            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::random(rng))),
36863            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::random(rng))),
36864            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
36865                HIL_ACTUATOR_CONTROLS_DATA::random(rng),
36866            )),
36867            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::random(rng))),
36868            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::random(rng))),
36869            HIL_OPTICAL_FLOW_DATA::ID => {
36870                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::random(rng)))
36871            }
36872            HIL_RC_INPUTS_RAW_DATA::ID => {
36873                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::random(rng)))
36874            }
36875            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::random(rng))),
36876            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::random(rng))),
36877            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
36878                HIL_STATE_QUATERNION_DATA::random(rng),
36879            )),
36880            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::random(rng))),
36881            HYGROMETER_SENSOR_DATA::ID => {
36882                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::random(rng)))
36883            }
36884            ILLUMINATOR_STATUS_DATA::ID => Some(Self::ILLUMINATOR_STATUS(
36885                ILLUMINATOR_STATUS_DATA::random(rng),
36886            )),
36887            ISBD_LINK_STATUS_DATA::ID => {
36888                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::random(rng)))
36889            }
36890            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::random(rng))),
36891            LINK_NODE_STATUS_DATA::ID => {
36892                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::random(rng)))
36893            }
36894            LOCAL_POSITION_NED_DATA::ID => Some(Self::LOCAL_POSITION_NED(
36895                LOCAL_POSITION_NED_DATA::random(rng),
36896            )),
36897            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
36898                LOCAL_POSITION_NED_COV_DATA::random(rng),
36899            )),
36900            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
36901                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
36902                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::random(rng),
36903                ))
36904            }
36905            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::random(rng))),
36906            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::random(rng))),
36907            LOGGING_DATA_ACKED_DATA::ID => Some(Self::LOGGING_DATA_ACKED(
36908                LOGGING_DATA_ACKED_DATA::random(rng),
36909            )),
36910            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::random(rng))),
36911            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::random(rng))),
36912            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::random(rng))),
36913            LOG_REQUEST_DATA_DATA::ID => {
36914                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::random(rng)))
36915            }
36916            LOG_REQUEST_END_DATA::ID => {
36917                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::random(rng)))
36918            }
36919            LOG_REQUEST_LIST_DATA::ID => {
36920                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::random(rng)))
36921            }
36922            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::random(rng))),
36923            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::random(rng))),
36924            MANUAL_SETPOINT_DATA::ID => {
36925                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::random(rng)))
36926            }
36927            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::random(rng))),
36928            MESSAGE_INTERVAL_DATA::ID => {
36929                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::random(rng)))
36930            }
36931            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::random(rng))),
36932            MISSION_CLEAR_ALL_DATA::ID => {
36933                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::random(rng)))
36934            }
36935            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::random(rng))),
36936            MISSION_CURRENT_DATA::ID => {
36937                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::random(rng)))
36938            }
36939            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::random(rng))),
36940            MISSION_ITEM_INT_DATA::ID => {
36941                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::random(rng)))
36942            }
36943            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
36944                MISSION_ITEM_REACHED_DATA::random(rng),
36945            )),
36946            MISSION_REQUEST_DATA::ID => {
36947                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::random(rng)))
36948            }
36949            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
36950                MISSION_REQUEST_INT_DATA::random(rng),
36951            )),
36952            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
36953                MISSION_REQUEST_LIST_DATA::random(rng),
36954            )),
36955            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
36956                MISSION_REQUEST_PARTIAL_LIST_DATA::random(rng),
36957            )),
36958            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
36959                MISSION_SET_CURRENT_DATA::random(rng),
36960            )),
36961            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
36962                MISSION_WRITE_PARTIAL_LIST_DATA::random(rng),
36963            )),
36964            MOUNT_ORIENTATION_DATA::ID => {
36965                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::random(rng)))
36966            }
36967            NAMED_VALUE_FLOAT_DATA::ID => {
36968                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::random(rng)))
36969            }
36970            NAMED_VALUE_INT_DATA::ID => {
36971                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::random(rng)))
36972            }
36973            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
36974                NAV_CONTROLLER_OUTPUT_DATA::random(rng),
36975            )),
36976            OBSTACLE_DISTANCE_DATA::ID => {
36977                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::random(rng)))
36978            }
36979            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::random(rng))),
36980            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
36981                ONBOARD_COMPUTER_STATUS_DATA::random(rng),
36982            )),
36983            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
36984                OPEN_DRONE_ID_ARM_STATUS_DATA::random(rng),
36985            )),
36986            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
36987                OPEN_DRONE_ID_AUTHENTICATION_DATA::random(rng),
36988            )),
36989            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
36990                OPEN_DRONE_ID_BASIC_ID_DATA::random(rng),
36991            )),
36992            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
36993                OPEN_DRONE_ID_LOCATION_DATA::random(rng),
36994            )),
36995            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
36996                OPEN_DRONE_ID_MESSAGE_PACK_DATA::random(rng),
36997            )),
36998            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
36999                OPEN_DRONE_ID_OPERATOR_ID_DATA::random(rng),
37000            )),
37001            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
37002                OPEN_DRONE_ID_SELF_ID_DATA::random(rng),
37003            )),
37004            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
37005                OPEN_DRONE_ID_SYSTEM_DATA::random(rng),
37006            )),
37007            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
37008                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::random(rng),
37009            )),
37010            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::random(rng))),
37011            OPTICAL_FLOW_RAD_DATA::ID => {
37012                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::random(rng)))
37013            }
37014            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
37015                ORBIT_EXECUTION_STATUS_DATA::random(rng),
37016            )),
37017            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::random(rng))),
37018            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
37019                PARAM_EXT_REQUEST_LIST_DATA::random(rng),
37020            )),
37021            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
37022                PARAM_EXT_REQUEST_READ_DATA::random(rng),
37023            )),
37024            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::random(rng))),
37025            PARAM_EXT_VALUE_DATA::ID => {
37026                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::random(rng)))
37027            }
37028            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::random(rng))),
37029            PARAM_REQUEST_LIST_DATA::ID => Some(Self::PARAM_REQUEST_LIST(
37030                PARAM_REQUEST_LIST_DATA::random(rng),
37031            )),
37032            PARAM_REQUEST_READ_DATA::ID => Some(Self::PARAM_REQUEST_READ(
37033                PARAM_REQUEST_READ_DATA::random(rng),
37034            )),
37035            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::random(rng))),
37036            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::random(rng))),
37037            PING_DATA::ID => Some(Self::PING(PING_DATA::random(rng))),
37038            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::random(rng))),
37039            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::random(rng))),
37040            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
37041                POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
37042            )),
37043            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
37044                POSITION_TARGET_LOCAL_NED_DATA::random(rng),
37045            )),
37046            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::random(rng))),
37047            PROTOCOL_VERSION_DATA::ID => {
37048                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::random(rng)))
37049            }
37050            RADIO_RC_CHANNELS_DATA::ID => {
37051                Some(Self::RADIO_RC_CHANNELS(RADIO_RC_CHANNELS_DATA::random(rng)))
37052            }
37053            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::random(rng))),
37054            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::random(rng))),
37055            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::random(rng))),
37056            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::random(rng))),
37057            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::random(rng))),
37058            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
37059                RC_CHANNELS_OVERRIDE_DATA::random(rng),
37060            )),
37061            RC_CHANNELS_RAW_DATA::ID => {
37062                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::random(rng)))
37063            }
37064            RC_CHANNELS_SCALED_DATA::ID => Some(Self::RC_CHANNELS_SCALED(
37065                RC_CHANNELS_SCALED_DATA::random(rng),
37066            )),
37067            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
37068                REQUEST_DATA_STREAM_DATA::random(rng),
37069            )),
37070            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::random(rng))),
37071            RESOURCE_REQUEST_DATA::ID => {
37072                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::random(rng)))
37073            }
37074            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
37075                RESPONSE_EVENT_ERROR_DATA::random(rng),
37076            )),
37077            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
37078                SAFETY_ALLOWED_AREA_DATA::random(rng),
37079            )),
37080            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
37081                SAFETY_SET_ALLOWED_AREA_DATA::random(rng),
37082            )),
37083            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::random(rng))),
37084            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::random(rng))),
37085            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::random(rng))),
37086            SCALED_PRESSURE_DATA::ID => {
37087                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::random(rng)))
37088            }
37089            SCALED_PRESSURE2_DATA::ID => {
37090                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::random(rng)))
37091            }
37092            SCALED_PRESSURE3_DATA::ID => {
37093                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::random(rng)))
37094            }
37095            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::random(rng))),
37096            SERVO_OUTPUT_RAW_DATA::ID => {
37097                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::random(rng)))
37098            }
37099            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::random(rng))),
37100            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
37101                SET_ACTUATOR_CONTROL_TARGET_DATA::random(rng),
37102            )),
37103            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
37104                SET_ATTITUDE_TARGET_DATA::random(rng),
37105            )),
37106            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
37107                SET_GPS_GLOBAL_ORIGIN_DATA::random(rng),
37108            )),
37109            SET_HOME_POSITION_DATA::ID => {
37110                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::random(rng)))
37111            }
37112            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::random(rng))),
37113            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
37114                SET_POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
37115            )),
37116            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
37117                SET_POSITION_TARGET_LOCAL_NED_DATA::random(rng),
37118            )),
37119            SET_VELOCITY_LIMITS_DATA::ID => Some(Self::SET_VELOCITY_LIMITS(
37120                SET_VELOCITY_LIMITS_DATA::random(rng),
37121            )),
37122            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::random(rng))),
37123            SMART_BATTERY_INFO_DATA::ID => Some(Self::SMART_BATTERY_INFO(
37124                SMART_BATTERY_INFO_DATA::random(rng),
37125            )),
37126            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::random(rng))),
37127            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
37128                STORAGE_INFORMATION_DATA::random(rng),
37129            )),
37130            SUPPORTED_TUNES_DATA::ID => {
37131                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::random(rng)))
37132            }
37133            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::random(rng))),
37134            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::random(rng))),
37135            TARGET_ABSOLUTE_DATA::ID => {
37136                Some(Self::TARGET_ABSOLUTE(TARGET_ABSOLUTE_DATA::random(rng)))
37137            }
37138            TARGET_RELATIVE_DATA::ID => {
37139                Some(Self::TARGET_RELATIVE(TARGET_RELATIVE_DATA::random(rng)))
37140            }
37141            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::random(rng))),
37142            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::random(rng))),
37143            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::random(rng))),
37144            TERRAIN_REQUEST_DATA::ID => {
37145                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::random(rng)))
37146            }
37147            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::random(rng))),
37148            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
37149                TIME_ESTIMATE_TO_TARGET_DATA::random(rng),
37150            )),
37151            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
37152                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
37153                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::random(rng),
37154                ))
37155            }
37156            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
37157                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
37158                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::random(rng),
37159                ))
37160            }
37161            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::random(rng))),
37162            UAVCAN_NODE_INFO_DATA::ID => {
37163                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::random(rng)))
37164            }
37165            UAVCAN_NODE_STATUS_DATA::ID => Some(Self::UAVCAN_NODE_STATUS(
37166                UAVCAN_NODE_STATUS_DATA::random(rng),
37167            )),
37168            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
37169                UTM_GLOBAL_POSITION_DATA::random(rng),
37170            )),
37171            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::random(rng))),
37172            VELOCITY_LIMITS_DATA::ID => {
37173                Some(Self::VELOCITY_LIMITS(VELOCITY_LIMITS_DATA::random(rng)))
37174            }
37175            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::random(rng))),
37176            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::random(rng))),
37177            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
37178                VICON_POSITION_ESTIMATE_DATA::random(rng),
37179            )),
37180            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
37181                VIDEO_STREAM_INFORMATION_DATA::random(rng),
37182            )),
37183            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
37184                VIDEO_STREAM_STATUS_DATA::random(rng),
37185            )),
37186            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
37187                VISION_POSITION_ESTIMATE_DATA::random(rng),
37188            )),
37189            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
37190                VISION_SPEED_ESTIMATE_DATA::random(rng),
37191            )),
37192            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::random(rng))),
37193            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::random(rng))),
37194            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::random(rng))),
37195            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::random(rng))),
37196            _ => None,
37197        }
37198    }
37199    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
37200        match self {
37201            Self::ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
37202            Self::ACTUATOR_OUTPUT_STATUS(body) => body.ser(version, bytes),
37203            Self::ADSB_VEHICLE(body) => body.ser(version, bytes),
37204            Self::AIRSPEED(body) => body.ser(version, bytes),
37205            Self::AIS_VESSEL(body) => body.ser(version, bytes),
37206            Self::ALTITUDE(body) => body.ser(version, bytes),
37207            Self::ATTITUDE(body) => body.ser(version, bytes),
37208            Self::ATTITUDE_QUATERNION(body) => body.ser(version, bytes),
37209            Self::ATTITUDE_QUATERNION_COV(body) => body.ser(version, bytes),
37210            Self::ATTITUDE_TARGET(body) => body.ser(version, bytes),
37211            Self::ATT_POS_MOCAP(body) => body.ser(version, bytes),
37212            Self::AUTH_KEY(body) => body.ser(version, bytes),
37213            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(body) => body.ser(version, bytes),
37214            Self::AUTOPILOT_VERSION(body) => body.ser(version, bytes),
37215            Self::AVAILABLE_MODES(body) => body.ser(version, bytes),
37216            Self::AVAILABLE_MODES_MONITOR(body) => body.ser(version, bytes),
37217            Self::BATTERY_INFO(body) => body.ser(version, bytes),
37218            Self::BATTERY_STATUS(body) => body.ser(version, bytes),
37219            Self::BATTERY_STATUS_V2(body) => body.ser(version, bytes),
37220            Self::BUTTON_CHANGE(body) => body.ser(version, bytes),
37221            Self::CAMERA_CAPTURE_STATUS(body) => body.ser(version, bytes),
37222            Self::CAMERA_FOV_STATUS(body) => body.ser(version, bytes),
37223            Self::CAMERA_IMAGE_CAPTURED(body) => body.ser(version, bytes),
37224            Self::CAMERA_INFORMATION(body) => body.ser(version, bytes),
37225            Self::CAMERA_SETTINGS(body) => body.ser(version, bytes),
37226            Self::CAMERA_THERMAL_RANGE(body) => body.ser(version, bytes),
37227            Self::CAMERA_TRACKING_GEO_STATUS(body) => body.ser(version, bytes),
37228            Self::CAMERA_TRACKING_IMAGE_STATUS(body) => body.ser(version, bytes),
37229            Self::CAMERA_TRIGGER(body) => body.ser(version, bytes),
37230            Self::CANFD_FRAME(body) => body.ser(version, bytes),
37231            Self::CAN_FILTER_MODIFY(body) => body.ser(version, bytes),
37232            Self::CAN_FRAME(body) => body.ser(version, bytes),
37233            Self::CELLULAR_CONFIG(body) => body.ser(version, bytes),
37234            Self::CELLULAR_STATUS(body) => body.ser(version, bytes),
37235            Self::CHANGE_OPERATOR_CONTROL(body) => body.ser(version, bytes),
37236            Self::CHANGE_OPERATOR_CONTROL_ACK(body) => body.ser(version, bytes),
37237            Self::COLLISION(body) => body.ser(version, bytes),
37238            Self::COMMAND_ACK(body) => body.ser(version, bytes),
37239            Self::COMMAND_CANCEL(body) => body.ser(version, bytes),
37240            Self::COMMAND_INT(body) => body.ser(version, bytes),
37241            Self::COMMAND_LONG(body) => body.ser(version, bytes),
37242            Self::COMPONENT_INFORMATION(body) => body.ser(version, bytes),
37243            Self::COMPONENT_INFORMATION_BASIC(body) => body.ser(version, bytes),
37244            Self::COMPONENT_METADATA(body) => body.ser(version, bytes),
37245            Self::CONTROL_STATUS(body) => body.ser(version, bytes),
37246            Self::CONTROL_SYSTEM_STATE(body) => body.ser(version, bytes),
37247            Self::CURRENT_EVENT_SEQUENCE(body) => body.ser(version, bytes),
37248            Self::CURRENT_MODE(body) => body.ser(version, bytes),
37249            Self::DATA_STREAM(body) => body.ser(version, bytes),
37250            Self::DATA_TRANSMISSION_HANDSHAKE(body) => body.ser(version, bytes),
37251            Self::DEBUG(body) => body.ser(version, bytes),
37252            Self::DEBUG_FLOAT_ARRAY(body) => body.ser(version, bytes),
37253            Self::DEBUG_VECT(body) => body.ser(version, bytes),
37254            Self::DISTANCE_SENSOR(body) => body.ser(version, bytes),
37255            Self::EFI_STATUS(body) => body.ser(version, bytes),
37256            Self::ENCAPSULATED_DATA(body) => body.ser(version, bytes),
37257            Self::ESC_INFO(body) => body.ser(version, bytes),
37258            Self::ESC_STATUS(body) => body.ser(version, bytes),
37259            Self::ESTIMATOR_STATUS(body) => body.ser(version, bytes),
37260            Self::EVENT(body) => body.ser(version, bytes),
37261            Self::EXTENDED_SYS_STATE(body) => body.ser(version, bytes),
37262            Self::FENCE_STATUS(body) => body.ser(version, bytes),
37263            Self::FIGURE_EIGHT_EXECUTION_STATUS(body) => body.ser(version, bytes),
37264            Self::FILE_TRANSFER_PROTOCOL(body) => body.ser(version, bytes),
37265            Self::FLIGHT_INFORMATION(body) => body.ser(version, bytes),
37266            Self::FOLLOW_TARGET(body) => body.ser(version, bytes),
37267            Self::FUEL_STATUS(body) => body.ser(version, bytes),
37268            Self::GENERATOR_STATUS(body) => body.ser(version, bytes),
37269            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(body) => body.ser(version, bytes),
37270            Self::GIMBAL_DEVICE_INFORMATION(body) => body.ser(version, bytes),
37271            Self::GIMBAL_DEVICE_SET_ATTITUDE(body) => body.ser(version, bytes),
37272            Self::GIMBAL_MANAGER_INFORMATION(body) => body.ser(version, bytes),
37273            Self::GIMBAL_MANAGER_SET_ATTITUDE(body) => body.ser(version, bytes),
37274            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(body) => body.ser(version, bytes),
37275            Self::GIMBAL_MANAGER_SET_PITCHYAW(body) => body.ser(version, bytes),
37276            Self::GIMBAL_MANAGER_STATUS(body) => body.ser(version, bytes),
37277            Self::GLOBAL_POSITION_INT(body) => body.ser(version, bytes),
37278            Self::GLOBAL_POSITION_INT_COV(body) => body.ser(version, bytes),
37279            Self::GLOBAL_VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
37280            Self::GNSS_INTEGRITY(body) => body.ser(version, bytes),
37281            Self::GPS2_RAW(body) => body.ser(version, bytes),
37282            Self::GPS2_RTK(body) => body.ser(version, bytes),
37283            Self::GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
37284            Self::GPS_INJECT_DATA(body) => body.ser(version, bytes),
37285            Self::GPS_INPUT(body) => body.ser(version, bytes),
37286            Self::GPS_RAW_INT(body) => body.ser(version, bytes),
37287            Self::GPS_RTCM_DATA(body) => body.ser(version, bytes),
37288            Self::GPS_RTK(body) => body.ser(version, bytes),
37289            Self::GPS_STATUS(body) => body.ser(version, bytes),
37290            Self::GROUP_END(body) => body.ser(version, bytes),
37291            Self::GROUP_START(body) => body.ser(version, bytes),
37292            Self::HEARTBEAT(body) => body.ser(version, bytes),
37293            Self::HIGHRES_IMU(body) => body.ser(version, bytes),
37294            Self::HIGH_LATENCY(body) => body.ser(version, bytes),
37295            Self::HIGH_LATENCY2(body) => body.ser(version, bytes),
37296            Self::HIL_ACTUATOR_CONTROLS(body) => body.ser(version, bytes),
37297            Self::HIL_CONTROLS(body) => body.ser(version, bytes),
37298            Self::HIL_GPS(body) => body.ser(version, bytes),
37299            Self::HIL_OPTICAL_FLOW(body) => body.ser(version, bytes),
37300            Self::HIL_RC_INPUTS_RAW(body) => body.ser(version, bytes),
37301            Self::HIL_SENSOR(body) => body.ser(version, bytes),
37302            Self::HIL_STATE(body) => body.ser(version, bytes),
37303            Self::HIL_STATE_QUATERNION(body) => body.ser(version, bytes),
37304            Self::HOME_POSITION(body) => body.ser(version, bytes),
37305            Self::HYGROMETER_SENSOR(body) => body.ser(version, bytes),
37306            Self::ILLUMINATOR_STATUS(body) => body.ser(version, bytes),
37307            Self::ISBD_LINK_STATUS(body) => body.ser(version, bytes),
37308            Self::LANDING_TARGET(body) => body.ser(version, bytes),
37309            Self::LINK_NODE_STATUS(body) => body.ser(version, bytes),
37310            Self::LOCAL_POSITION_NED(body) => body.ser(version, bytes),
37311            Self::LOCAL_POSITION_NED_COV(body) => body.ser(version, bytes),
37312            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(body) => body.ser(version, bytes),
37313            Self::LOGGING_ACK(body) => body.ser(version, bytes),
37314            Self::LOGGING_DATA(body) => body.ser(version, bytes),
37315            Self::LOGGING_DATA_ACKED(body) => body.ser(version, bytes),
37316            Self::LOG_DATA(body) => body.ser(version, bytes),
37317            Self::LOG_ENTRY(body) => body.ser(version, bytes),
37318            Self::LOG_ERASE(body) => body.ser(version, bytes),
37319            Self::LOG_REQUEST_DATA(body) => body.ser(version, bytes),
37320            Self::LOG_REQUEST_END(body) => body.ser(version, bytes),
37321            Self::LOG_REQUEST_LIST(body) => body.ser(version, bytes),
37322            Self::MAG_CAL_REPORT(body) => body.ser(version, bytes),
37323            Self::MANUAL_CONTROL(body) => body.ser(version, bytes),
37324            Self::MANUAL_SETPOINT(body) => body.ser(version, bytes),
37325            Self::MEMORY_VECT(body) => body.ser(version, bytes),
37326            Self::MESSAGE_INTERVAL(body) => body.ser(version, bytes),
37327            Self::MISSION_ACK(body) => body.ser(version, bytes),
37328            Self::MISSION_CLEAR_ALL(body) => body.ser(version, bytes),
37329            Self::MISSION_COUNT(body) => body.ser(version, bytes),
37330            Self::MISSION_CURRENT(body) => body.ser(version, bytes),
37331            Self::MISSION_ITEM(body) => body.ser(version, bytes),
37332            Self::MISSION_ITEM_INT(body) => body.ser(version, bytes),
37333            Self::MISSION_ITEM_REACHED(body) => body.ser(version, bytes),
37334            Self::MISSION_REQUEST(body) => body.ser(version, bytes),
37335            Self::MISSION_REQUEST_INT(body) => body.ser(version, bytes),
37336            Self::MISSION_REQUEST_LIST(body) => body.ser(version, bytes),
37337            Self::MISSION_REQUEST_PARTIAL_LIST(body) => body.ser(version, bytes),
37338            Self::MISSION_SET_CURRENT(body) => body.ser(version, bytes),
37339            Self::MISSION_WRITE_PARTIAL_LIST(body) => body.ser(version, bytes),
37340            Self::MOUNT_ORIENTATION(body) => body.ser(version, bytes),
37341            Self::NAMED_VALUE_FLOAT(body) => body.ser(version, bytes),
37342            Self::NAMED_VALUE_INT(body) => body.ser(version, bytes),
37343            Self::NAV_CONTROLLER_OUTPUT(body) => body.ser(version, bytes),
37344            Self::OBSTACLE_DISTANCE(body) => body.ser(version, bytes),
37345            Self::ODOMETRY(body) => body.ser(version, bytes),
37346            Self::ONBOARD_COMPUTER_STATUS(body) => body.ser(version, bytes),
37347            Self::OPEN_DRONE_ID_ARM_STATUS(body) => body.ser(version, bytes),
37348            Self::OPEN_DRONE_ID_AUTHENTICATION(body) => body.ser(version, bytes),
37349            Self::OPEN_DRONE_ID_BASIC_ID(body) => body.ser(version, bytes),
37350            Self::OPEN_DRONE_ID_LOCATION(body) => body.ser(version, bytes),
37351            Self::OPEN_DRONE_ID_MESSAGE_PACK(body) => body.ser(version, bytes),
37352            Self::OPEN_DRONE_ID_OPERATOR_ID(body) => body.ser(version, bytes),
37353            Self::OPEN_DRONE_ID_SELF_ID(body) => body.ser(version, bytes),
37354            Self::OPEN_DRONE_ID_SYSTEM(body) => body.ser(version, bytes),
37355            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(body) => body.ser(version, bytes),
37356            Self::OPTICAL_FLOW(body) => body.ser(version, bytes),
37357            Self::OPTICAL_FLOW_RAD(body) => body.ser(version, bytes),
37358            Self::ORBIT_EXECUTION_STATUS(body) => body.ser(version, bytes),
37359            Self::PARAM_EXT_ACK(body) => body.ser(version, bytes),
37360            Self::PARAM_EXT_REQUEST_LIST(body) => body.ser(version, bytes),
37361            Self::PARAM_EXT_REQUEST_READ(body) => body.ser(version, bytes),
37362            Self::PARAM_EXT_SET(body) => body.ser(version, bytes),
37363            Self::PARAM_EXT_VALUE(body) => body.ser(version, bytes),
37364            Self::PARAM_MAP_RC(body) => body.ser(version, bytes),
37365            Self::PARAM_REQUEST_LIST(body) => body.ser(version, bytes),
37366            Self::PARAM_REQUEST_READ(body) => body.ser(version, bytes),
37367            Self::PARAM_SET(body) => body.ser(version, bytes),
37368            Self::PARAM_VALUE(body) => body.ser(version, bytes),
37369            Self::PING(body) => body.ser(version, bytes),
37370            Self::PLAY_TUNE(body) => body.ser(version, bytes),
37371            Self::PLAY_TUNE_V2(body) => body.ser(version, bytes),
37372            Self::POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
37373            Self::POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
37374            Self::POWER_STATUS(body) => body.ser(version, bytes),
37375            Self::PROTOCOL_VERSION(body) => body.ser(version, bytes),
37376            Self::RADIO_RC_CHANNELS(body) => body.ser(version, bytes),
37377            Self::RADIO_STATUS(body) => body.ser(version, bytes),
37378            Self::RAW_IMU(body) => body.ser(version, bytes),
37379            Self::RAW_PRESSURE(body) => body.ser(version, bytes),
37380            Self::RAW_RPM(body) => body.ser(version, bytes),
37381            Self::RC_CHANNELS(body) => body.ser(version, bytes),
37382            Self::RC_CHANNELS_OVERRIDE(body) => body.ser(version, bytes),
37383            Self::RC_CHANNELS_RAW(body) => body.ser(version, bytes),
37384            Self::RC_CHANNELS_SCALED(body) => body.ser(version, bytes),
37385            Self::REQUEST_DATA_STREAM(body) => body.ser(version, bytes),
37386            Self::REQUEST_EVENT(body) => body.ser(version, bytes),
37387            Self::RESOURCE_REQUEST(body) => body.ser(version, bytes),
37388            Self::RESPONSE_EVENT_ERROR(body) => body.ser(version, bytes),
37389            Self::SAFETY_ALLOWED_AREA(body) => body.ser(version, bytes),
37390            Self::SAFETY_SET_ALLOWED_AREA(body) => body.ser(version, bytes),
37391            Self::SCALED_IMU(body) => body.ser(version, bytes),
37392            Self::SCALED_IMU2(body) => body.ser(version, bytes),
37393            Self::SCALED_IMU3(body) => body.ser(version, bytes),
37394            Self::SCALED_PRESSURE(body) => body.ser(version, bytes),
37395            Self::SCALED_PRESSURE2(body) => body.ser(version, bytes),
37396            Self::SCALED_PRESSURE3(body) => body.ser(version, bytes),
37397            Self::SERIAL_CONTROL(body) => body.ser(version, bytes),
37398            Self::SERVO_OUTPUT_RAW(body) => body.ser(version, bytes),
37399            Self::SETUP_SIGNING(body) => body.ser(version, bytes),
37400            Self::SET_ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
37401            Self::SET_ATTITUDE_TARGET(body) => body.ser(version, bytes),
37402            Self::SET_GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
37403            Self::SET_HOME_POSITION(body) => body.ser(version, bytes),
37404            Self::SET_MODE(body) => body.ser(version, bytes),
37405            Self::SET_POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
37406            Self::SET_POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
37407            Self::SET_VELOCITY_LIMITS(body) => body.ser(version, bytes),
37408            Self::SIM_STATE(body) => body.ser(version, bytes),
37409            Self::SMART_BATTERY_INFO(body) => body.ser(version, bytes),
37410            Self::STATUSTEXT(body) => body.ser(version, bytes),
37411            Self::STORAGE_INFORMATION(body) => body.ser(version, bytes),
37412            Self::SUPPORTED_TUNES(body) => body.ser(version, bytes),
37413            Self::SYSTEM_TIME(body) => body.ser(version, bytes),
37414            Self::SYS_STATUS(body) => body.ser(version, bytes),
37415            Self::TARGET_ABSOLUTE(body) => body.ser(version, bytes),
37416            Self::TARGET_RELATIVE(body) => body.ser(version, bytes),
37417            Self::TERRAIN_CHECK(body) => body.ser(version, bytes),
37418            Self::TERRAIN_DATA(body) => body.ser(version, bytes),
37419            Self::TERRAIN_REPORT(body) => body.ser(version, bytes),
37420            Self::TERRAIN_REQUEST(body) => body.ser(version, bytes),
37421            Self::TIMESYNC(body) => body.ser(version, bytes),
37422            Self::TIME_ESTIMATE_TO_TARGET(body) => body.ser(version, bytes),
37423            Self::TRAJECTORY_REPRESENTATION_BEZIER(body) => body.ser(version, bytes),
37424            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(body) => body.ser(version, bytes),
37425            Self::TUNNEL(body) => body.ser(version, bytes),
37426            Self::UAVCAN_NODE_INFO(body) => body.ser(version, bytes),
37427            Self::UAVCAN_NODE_STATUS(body) => body.ser(version, bytes),
37428            Self::UTM_GLOBAL_POSITION(body) => body.ser(version, bytes),
37429            Self::V2_EXTENSION(body) => body.ser(version, bytes),
37430            Self::VELOCITY_LIMITS(body) => body.ser(version, bytes),
37431            Self::VFR_HUD(body) => body.ser(version, bytes),
37432            Self::VIBRATION(body) => body.ser(version, bytes),
37433            Self::VICON_POSITION_ESTIMATE(body) => body.ser(version, bytes),
37434            Self::VIDEO_STREAM_INFORMATION(body) => body.ser(version, bytes),
37435            Self::VIDEO_STREAM_STATUS(body) => body.ser(version, bytes),
37436            Self::VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
37437            Self::VISION_SPEED_ESTIMATE(body) => body.ser(version, bytes),
37438            Self::WHEEL_DISTANCE(body) => body.ser(version, bytes),
37439            Self::WIFI_CONFIG_AP(body) => body.ser(version, bytes),
37440            Self::WINCH_STATUS(body) => body.ser(version, bytes),
37441            Self::WIND_COV(body) => body.ser(version, bytes),
37442        }
37443    }
37444    fn extra_crc(id: u32) -> u8 {
37445        match id {
37446            ACTUATOR_CONTROL_TARGET_DATA::ID => ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
37447            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::EXTRA_CRC,
37448            ADSB_VEHICLE_DATA::ID => ADSB_VEHICLE_DATA::EXTRA_CRC,
37449            AIRSPEED_DATA::ID => AIRSPEED_DATA::EXTRA_CRC,
37450            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::EXTRA_CRC,
37451            ALTITUDE_DATA::ID => ALTITUDE_DATA::EXTRA_CRC,
37452            ATTITUDE_DATA::ID => ATTITUDE_DATA::EXTRA_CRC,
37453            ATTITUDE_QUATERNION_DATA::ID => ATTITUDE_QUATERNION_DATA::EXTRA_CRC,
37454            ATTITUDE_QUATERNION_COV_DATA::ID => ATTITUDE_QUATERNION_COV_DATA::EXTRA_CRC,
37455            ATTITUDE_TARGET_DATA::ID => ATTITUDE_TARGET_DATA::EXTRA_CRC,
37456            ATT_POS_MOCAP_DATA::ID => ATT_POS_MOCAP_DATA::EXTRA_CRC,
37457            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::EXTRA_CRC,
37458            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
37459                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::EXTRA_CRC
37460            }
37461            AUTOPILOT_VERSION_DATA::ID => AUTOPILOT_VERSION_DATA::EXTRA_CRC,
37462            AVAILABLE_MODES_DATA::ID => AVAILABLE_MODES_DATA::EXTRA_CRC,
37463            AVAILABLE_MODES_MONITOR_DATA::ID => AVAILABLE_MODES_MONITOR_DATA::EXTRA_CRC,
37464            BATTERY_INFO_DATA::ID => BATTERY_INFO_DATA::EXTRA_CRC,
37465            BATTERY_STATUS_DATA::ID => BATTERY_STATUS_DATA::EXTRA_CRC,
37466            BATTERY_STATUS_V2_DATA::ID => BATTERY_STATUS_V2_DATA::EXTRA_CRC,
37467            BUTTON_CHANGE_DATA::ID => BUTTON_CHANGE_DATA::EXTRA_CRC,
37468            CAMERA_CAPTURE_STATUS_DATA::ID => CAMERA_CAPTURE_STATUS_DATA::EXTRA_CRC,
37469            CAMERA_FOV_STATUS_DATA::ID => CAMERA_FOV_STATUS_DATA::EXTRA_CRC,
37470            CAMERA_IMAGE_CAPTURED_DATA::ID => CAMERA_IMAGE_CAPTURED_DATA::EXTRA_CRC,
37471            CAMERA_INFORMATION_DATA::ID => CAMERA_INFORMATION_DATA::EXTRA_CRC,
37472            CAMERA_SETTINGS_DATA::ID => CAMERA_SETTINGS_DATA::EXTRA_CRC,
37473            CAMERA_THERMAL_RANGE_DATA::ID => CAMERA_THERMAL_RANGE_DATA::EXTRA_CRC,
37474            CAMERA_TRACKING_GEO_STATUS_DATA::ID => CAMERA_TRACKING_GEO_STATUS_DATA::EXTRA_CRC,
37475            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => CAMERA_TRACKING_IMAGE_STATUS_DATA::EXTRA_CRC,
37476            CAMERA_TRIGGER_DATA::ID => CAMERA_TRIGGER_DATA::EXTRA_CRC,
37477            CANFD_FRAME_DATA::ID => CANFD_FRAME_DATA::EXTRA_CRC,
37478            CAN_FILTER_MODIFY_DATA::ID => CAN_FILTER_MODIFY_DATA::EXTRA_CRC,
37479            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::EXTRA_CRC,
37480            CELLULAR_CONFIG_DATA::ID => CELLULAR_CONFIG_DATA::EXTRA_CRC,
37481            CELLULAR_STATUS_DATA::ID => CELLULAR_STATUS_DATA::EXTRA_CRC,
37482            CHANGE_OPERATOR_CONTROL_DATA::ID => CHANGE_OPERATOR_CONTROL_DATA::EXTRA_CRC,
37483            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => CHANGE_OPERATOR_CONTROL_ACK_DATA::EXTRA_CRC,
37484            COLLISION_DATA::ID => COLLISION_DATA::EXTRA_CRC,
37485            COMMAND_ACK_DATA::ID => COMMAND_ACK_DATA::EXTRA_CRC,
37486            COMMAND_CANCEL_DATA::ID => COMMAND_CANCEL_DATA::EXTRA_CRC,
37487            COMMAND_INT_DATA::ID => COMMAND_INT_DATA::EXTRA_CRC,
37488            COMMAND_LONG_DATA::ID => COMMAND_LONG_DATA::EXTRA_CRC,
37489            COMPONENT_INFORMATION_DATA::ID => COMPONENT_INFORMATION_DATA::EXTRA_CRC,
37490            COMPONENT_INFORMATION_BASIC_DATA::ID => COMPONENT_INFORMATION_BASIC_DATA::EXTRA_CRC,
37491            COMPONENT_METADATA_DATA::ID => COMPONENT_METADATA_DATA::EXTRA_CRC,
37492            CONTROL_STATUS_DATA::ID => CONTROL_STATUS_DATA::EXTRA_CRC,
37493            CONTROL_SYSTEM_STATE_DATA::ID => CONTROL_SYSTEM_STATE_DATA::EXTRA_CRC,
37494            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::EXTRA_CRC,
37495            CURRENT_MODE_DATA::ID => CURRENT_MODE_DATA::EXTRA_CRC,
37496            DATA_STREAM_DATA::ID => DATA_STREAM_DATA::EXTRA_CRC,
37497            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => DATA_TRANSMISSION_HANDSHAKE_DATA::EXTRA_CRC,
37498            DEBUG_DATA::ID => DEBUG_DATA::EXTRA_CRC,
37499            DEBUG_FLOAT_ARRAY_DATA::ID => DEBUG_FLOAT_ARRAY_DATA::EXTRA_CRC,
37500            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::EXTRA_CRC,
37501            DISTANCE_SENSOR_DATA::ID => DISTANCE_SENSOR_DATA::EXTRA_CRC,
37502            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::EXTRA_CRC,
37503            ENCAPSULATED_DATA_DATA::ID => ENCAPSULATED_DATA_DATA::EXTRA_CRC,
37504            ESC_INFO_DATA::ID => ESC_INFO_DATA::EXTRA_CRC,
37505            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::EXTRA_CRC,
37506            ESTIMATOR_STATUS_DATA::ID => ESTIMATOR_STATUS_DATA::EXTRA_CRC,
37507            EVENT_DATA::ID => EVENT_DATA::EXTRA_CRC,
37508            EXTENDED_SYS_STATE_DATA::ID => EXTENDED_SYS_STATE_DATA::EXTRA_CRC,
37509            FENCE_STATUS_DATA::ID => FENCE_STATUS_DATA::EXTRA_CRC,
37510            FIGURE_EIGHT_EXECUTION_STATUS_DATA::ID => FIGURE_EIGHT_EXECUTION_STATUS_DATA::EXTRA_CRC,
37511            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::EXTRA_CRC,
37512            FLIGHT_INFORMATION_DATA::ID => FLIGHT_INFORMATION_DATA::EXTRA_CRC,
37513            FOLLOW_TARGET_DATA::ID => FOLLOW_TARGET_DATA::EXTRA_CRC,
37514            FUEL_STATUS_DATA::ID => FUEL_STATUS_DATA::EXTRA_CRC,
37515            GENERATOR_STATUS_DATA::ID => GENERATOR_STATUS_DATA::EXTRA_CRC,
37516            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::EXTRA_CRC,
37517            GIMBAL_DEVICE_INFORMATION_DATA::ID => GIMBAL_DEVICE_INFORMATION_DATA::EXTRA_CRC,
37518            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => GIMBAL_DEVICE_SET_ATTITUDE_DATA::EXTRA_CRC,
37519            GIMBAL_MANAGER_INFORMATION_DATA::ID => GIMBAL_MANAGER_INFORMATION_DATA::EXTRA_CRC,
37520            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => GIMBAL_MANAGER_SET_ATTITUDE_DATA::EXTRA_CRC,
37521            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
37522                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::EXTRA_CRC
37523            }
37524            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => GIMBAL_MANAGER_SET_PITCHYAW_DATA::EXTRA_CRC,
37525            GIMBAL_MANAGER_STATUS_DATA::ID => GIMBAL_MANAGER_STATUS_DATA::EXTRA_CRC,
37526            GLOBAL_POSITION_INT_DATA::ID => GLOBAL_POSITION_INT_DATA::EXTRA_CRC,
37527            GLOBAL_POSITION_INT_COV_DATA::ID => GLOBAL_POSITION_INT_COV_DATA::EXTRA_CRC,
37528            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
37529                GLOBAL_VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC
37530            }
37531            GNSS_INTEGRITY_DATA::ID => GNSS_INTEGRITY_DATA::EXTRA_CRC,
37532            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::EXTRA_CRC,
37533            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::EXTRA_CRC,
37534            GPS_GLOBAL_ORIGIN_DATA::ID => GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
37535            GPS_INJECT_DATA_DATA::ID => GPS_INJECT_DATA_DATA::EXTRA_CRC,
37536            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::EXTRA_CRC,
37537            GPS_RAW_INT_DATA::ID => GPS_RAW_INT_DATA::EXTRA_CRC,
37538            GPS_RTCM_DATA_DATA::ID => GPS_RTCM_DATA_DATA::EXTRA_CRC,
37539            GPS_RTK_DATA::ID => GPS_RTK_DATA::EXTRA_CRC,
37540            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::EXTRA_CRC,
37541            GROUP_END_DATA::ID => GROUP_END_DATA::EXTRA_CRC,
37542            GROUP_START_DATA::ID => GROUP_START_DATA::EXTRA_CRC,
37543            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::EXTRA_CRC,
37544            HIGHRES_IMU_DATA::ID => HIGHRES_IMU_DATA::EXTRA_CRC,
37545            HIGH_LATENCY_DATA::ID => HIGH_LATENCY_DATA::EXTRA_CRC,
37546            HIGH_LATENCY2_DATA::ID => HIGH_LATENCY2_DATA::EXTRA_CRC,
37547            HIL_ACTUATOR_CONTROLS_DATA::ID => HIL_ACTUATOR_CONTROLS_DATA::EXTRA_CRC,
37548            HIL_CONTROLS_DATA::ID => HIL_CONTROLS_DATA::EXTRA_CRC,
37549            HIL_GPS_DATA::ID => HIL_GPS_DATA::EXTRA_CRC,
37550            HIL_OPTICAL_FLOW_DATA::ID => HIL_OPTICAL_FLOW_DATA::EXTRA_CRC,
37551            HIL_RC_INPUTS_RAW_DATA::ID => HIL_RC_INPUTS_RAW_DATA::EXTRA_CRC,
37552            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::EXTRA_CRC,
37553            HIL_STATE_DATA::ID => HIL_STATE_DATA::EXTRA_CRC,
37554            HIL_STATE_QUATERNION_DATA::ID => HIL_STATE_QUATERNION_DATA::EXTRA_CRC,
37555            HOME_POSITION_DATA::ID => HOME_POSITION_DATA::EXTRA_CRC,
37556            HYGROMETER_SENSOR_DATA::ID => HYGROMETER_SENSOR_DATA::EXTRA_CRC,
37557            ILLUMINATOR_STATUS_DATA::ID => ILLUMINATOR_STATUS_DATA::EXTRA_CRC,
37558            ISBD_LINK_STATUS_DATA::ID => ISBD_LINK_STATUS_DATA::EXTRA_CRC,
37559            LANDING_TARGET_DATA::ID => LANDING_TARGET_DATA::EXTRA_CRC,
37560            LINK_NODE_STATUS_DATA::ID => LINK_NODE_STATUS_DATA::EXTRA_CRC,
37561            LOCAL_POSITION_NED_DATA::ID => LOCAL_POSITION_NED_DATA::EXTRA_CRC,
37562            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::EXTRA_CRC,
37563            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
37564                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::EXTRA_CRC
37565            }
37566            LOGGING_ACK_DATA::ID => LOGGING_ACK_DATA::EXTRA_CRC,
37567            LOGGING_DATA_DATA::ID => LOGGING_DATA_DATA::EXTRA_CRC,
37568            LOGGING_DATA_ACKED_DATA::ID => LOGGING_DATA_ACKED_DATA::EXTRA_CRC,
37569            LOG_DATA_DATA::ID => LOG_DATA_DATA::EXTRA_CRC,
37570            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::EXTRA_CRC,
37571            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::EXTRA_CRC,
37572            LOG_REQUEST_DATA_DATA::ID => LOG_REQUEST_DATA_DATA::EXTRA_CRC,
37573            LOG_REQUEST_END_DATA::ID => LOG_REQUEST_END_DATA::EXTRA_CRC,
37574            LOG_REQUEST_LIST_DATA::ID => LOG_REQUEST_LIST_DATA::EXTRA_CRC,
37575            MAG_CAL_REPORT_DATA::ID => MAG_CAL_REPORT_DATA::EXTRA_CRC,
37576            MANUAL_CONTROL_DATA::ID => MANUAL_CONTROL_DATA::EXTRA_CRC,
37577            MANUAL_SETPOINT_DATA::ID => MANUAL_SETPOINT_DATA::EXTRA_CRC,
37578            MEMORY_VECT_DATA::ID => MEMORY_VECT_DATA::EXTRA_CRC,
37579            MESSAGE_INTERVAL_DATA::ID => MESSAGE_INTERVAL_DATA::EXTRA_CRC,
37580            MISSION_ACK_DATA::ID => MISSION_ACK_DATA::EXTRA_CRC,
37581            MISSION_CLEAR_ALL_DATA::ID => MISSION_CLEAR_ALL_DATA::EXTRA_CRC,
37582            MISSION_COUNT_DATA::ID => MISSION_COUNT_DATA::EXTRA_CRC,
37583            MISSION_CURRENT_DATA::ID => MISSION_CURRENT_DATA::EXTRA_CRC,
37584            MISSION_ITEM_DATA::ID => MISSION_ITEM_DATA::EXTRA_CRC,
37585            MISSION_ITEM_INT_DATA::ID => MISSION_ITEM_INT_DATA::EXTRA_CRC,
37586            MISSION_ITEM_REACHED_DATA::ID => MISSION_ITEM_REACHED_DATA::EXTRA_CRC,
37587            MISSION_REQUEST_DATA::ID => MISSION_REQUEST_DATA::EXTRA_CRC,
37588            MISSION_REQUEST_INT_DATA::ID => MISSION_REQUEST_INT_DATA::EXTRA_CRC,
37589            MISSION_REQUEST_LIST_DATA::ID => MISSION_REQUEST_LIST_DATA::EXTRA_CRC,
37590            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => MISSION_REQUEST_PARTIAL_LIST_DATA::EXTRA_CRC,
37591            MISSION_SET_CURRENT_DATA::ID => MISSION_SET_CURRENT_DATA::EXTRA_CRC,
37592            MISSION_WRITE_PARTIAL_LIST_DATA::ID => MISSION_WRITE_PARTIAL_LIST_DATA::EXTRA_CRC,
37593            MOUNT_ORIENTATION_DATA::ID => MOUNT_ORIENTATION_DATA::EXTRA_CRC,
37594            NAMED_VALUE_FLOAT_DATA::ID => NAMED_VALUE_FLOAT_DATA::EXTRA_CRC,
37595            NAMED_VALUE_INT_DATA::ID => NAMED_VALUE_INT_DATA::EXTRA_CRC,
37596            NAV_CONTROLLER_OUTPUT_DATA::ID => NAV_CONTROLLER_OUTPUT_DATA::EXTRA_CRC,
37597            OBSTACLE_DISTANCE_DATA::ID => OBSTACLE_DISTANCE_DATA::EXTRA_CRC,
37598            ODOMETRY_DATA::ID => ODOMETRY_DATA::EXTRA_CRC,
37599            ONBOARD_COMPUTER_STATUS_DATA::ID => ONBOARD_COMPUTER_STATUS_DATA::EXTRA_CRC,
37600            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => OPEN_DRONE_ID_ARM_STATUS_DATA::EXTRA_CRC,
37601            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => OPEN_DRONE_ID_AUTHENTICATION_DATA::EXTRA_CRC,
37602            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::EXTRA_CRC,
37603            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::EXTRA_CRC,
37604            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => OPEN_DRONE_ID_MESSAGE_PACK_DATA::EXTRA_CRC,
37605            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => OPEN_DRONE_ID_OPERATOR_ID_DATA::EXTRA_CRC,
37606            OPEN_DRONE_ID_SELF_ID_DATA::ID => OPEN_DRONE_ID_SELF_ID_DATA::EXTRA_CRC,
37607            OPEN_DRONE_ID_SYSTEM_DATA::ID => OPEN_DRONE_ID_SYSTEM_DATA::EXTRA_CRC,
37608            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::EXTRA_CRC,
37609            OPTICAL_FLOW_DATA::ID => OPTICAL_FLOW_DATA::EXTRA_CRC,
37610            OPTICAL_FLOW_RAD_DATA::ID => OPTICAL_FLOW_RAD_DATA::EXTRA_CRC,
37611            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::EXTRA_CRC,
37612            PARAM_EXT_ACK_DATA::ID => PARAM_EXT_ACK_DATA::EXTRA_CRC,
37613            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::EXTRA_CRC,
37614            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::EXTRA_CRC,
37615            PARAM_EXT_SET_DATA::ID => PARAM_EXT_SET_DATA::EXTRA_CRC,
37616            PARAM_EXT_VALUE_DATA::ID => PARAM_EXT_VALUE_DATA::EXTRA_CRC,
37617            PARAM_MAP_RC_DATA::ID => PARAM_MAP_RC_DATA::EXTRA_CRC,
37618            PARAM_REQUEST_LIST_DATA::ID => PARAM_REQUEST_LIST_DATA::EXTRA_CRC,
37619            PARAM_REQUEST_READ_DATA::ID => PARAM_REQUEST_READ_DATA::EXTRA_CRC,
37620            PARAM_SET_DATA::ID => PARAM_SET_DATA::EXTRA_CRC,
37621            PARAM_VALUE_DATA::ID => PARAM_VALUE_DATA::EXTRA_CRC,
37622            PING_DATA::ID => PING_DATA::EXTRA_CRC,
37623            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::EXTRA_CRC,
37624            PLAY_TUNE_V2_DATA::ID => PLAY_TUNE_V2_DATA::EXTRA_CRC,
37625            POSITION_TARGET_GLOBAL_INT_DATA::ID => POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC,
37626            POSITION_TARGET_LOCAL_NED_DATA::ID => POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
37627            POWER_STATUS_DATA::ID => POWER_STATUS_DATA::EXTRA_CRC,
37628            PROTOCOL_VERSION_DATA::ID => PROTOCOL_VERSION_DATA::EXTRA_CRC,
37629            RADIO_RC_CHANNELS_DATA::ID => RADIO_RC_CHANNELS_DATA::EXTRA_CRC,
37630            RADIO_STATUS_DATA::ID => RADIO_STATUS_DATA::EXTRA_CRC,
37631            RAW_IMU_DATA::ID => RAW_IMU_DATA::EXTRA_CRC,
37632            RAW_PRESSURE_DATA::ID => RAW_PRESSURE_DATA::EXTRA_CRC,
37633            RAW_RPM_DATA::ID => RAW_RPM_DATA::EXTRA_CRC,
37634            RC_CHANNELS_DATA::ID => RC_CHANNELS_DATA::EXTRA_CRC,
37635            RC_CHANNELS_OVERRIDE_DATA::ID => RC_CHANNELS_OVERRIDE_DATA::EXTRA_CRC,
37636            RC_CHANNELS_RAW_DATA::ID => RC_CHANNELS_RAW_DATA::EXTRA_CRC,
37637            RC_CHANNELS_SCALED_DATA::ID => RC_CHANNELS_SCALED_DATA::EXTRA_CRC,
37638            REQUEST_DATA_STREAM_DATA::ID => REQUEST_DATA_STREAM_DATA::EXTRA_CRC,
37639            REQUEST_EVENT_DATA::ID => REQUEST_EVENT_DATA::EXTRA_CRC,
37640            RESOURCE_REQUEST_DATA::ID => RESOURCE_REQUEST_DATA::EXTRA_CRC,
37641            RESPONSE_EVENT_ERROR_DATA::ID => RESPONSE_EVENT_ERROR_DATA::EXTRA_CRC,
37642            SAFETY_ALLOWED_AREA_DATA::ID => SAFETY_ALLOWED_AREA_DATA::EXTRA_CRC,
37643            SAFETY_SET_ALLOWED_AREA_DATA::ID => SAFETY_SET_ALLOWED_AREA_DATA::EXTRA_CRC,
37644            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::EXTRA_CRC,
37645            SCALED_IMU2_DATA::ID => SCALED_IMU2_DATA::EXTRA_CRC,
37646            SCALED_IMU3_DATA::ID => SCALED_IMU3_DATA::EXTRA_CRC,
37647            SCALED_PRESSURE_DATA::ID => SCALED_PRESSURE_DATA::EXTRA_CRC,
37648            SCALED_PRESSURE2_DATA::ID => SCALED_PRESSURE2_DATA::EXTRA_CRC,
37649            SCALED_PRESSURE3_DATA::ID => SCALED_PRESSURE3_DATA::EXTRA_CRC,
37650            SERIAL_CONTROL_DATA::ID => SERIAL_CONTROL_DATA::EXTRA_CRC,
37651            SERVO_OUTPUT_RAW_DATA::ID => SERVO_OUTPUT_RAW_DATA::EXTRA_CRC,
37652            SETUP_SIGNING_DATA::ID => SETUP_SIGNING_DATA::EXTRA_CRC,
37653            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => SET_ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
37654            SET_ATTITUDE_TARGET_DATA::ID => SET_ATTITUDE_TARGET_DATA::EXTRA_CRC,
37655            SET_GPS_GLOBAL_ORIGIN_DATA::ID => SET_GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
37656            SET_HOME_POSITION_DATA::ID => SET_HOME_POSITION_DATA::EXTRA_CRC,
37657            SET_MODE_DATA::ID => SET_MODE_DATA::EXTRA_CRC,
37658            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
37659                SET_POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC
37660            }
37661            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => SET_POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
37662            SET_VELOCITY_LIMITS_DATA::ID => SET_VELOCITY_LIMITS_DATA::EXTRA_CRC,
37663            SIM_STATE_DATA::ID => SIM_STATE_DATA::EXTRA_CRC,
37664            SMART_BATTERY_INFO_DATA::ID => SMART_BATTERY_INFO_DATA::EXTRA_CRC,
37665            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::EXTRA_CRC,
37666            STORAGE_INFORMATION_DATA::ID => STORAGE_INFORMATION_DATA::EXTRA_CRC,
37667            SUPPORTED_TUNES_DATA::ID => SUPPORTED_TUNES_DATA::EXTRA_CRC,
37668            SYSTEM_TIME_DATA::ID => SYSTEM_TIME_DATA::EXTRA_CRC,
37669            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::EXTRA_CRC,
37670            TARGET_ABSOLUTE_DATA::ID => TARGET_ABSOLUTE_DATA::EXTRA_CRC,
37671            TARGET_RELATIVE_DATA::ID => TARGET_RELATIVE_DATA::EXTRA_CRC,
37672            TERRAIN_CHECK_DATA::ID => TERRAIN_CHECK_DATA::EXTRA_CRC,
37673            TERRAIN_DATA_DATA::ID => TERRAIN_DATA_DATA::EXTRA_CRC,
37674            TERRAIN_REPORT_DATA::ID => TERRAIN_REPORT_DATA::EXTRA_CRC,
37675            TERRAIN_REQUEST_DATA::ID => TERRAIN_REQUEST_DATA::EXTRA_CRC,
37676            TIMESYNC_DATA::ID => TIMESYNC_DATA::EXTRA_CRC,
37677            TIME_ESTIMATE_TO_TARGET_DATA::ID => TIME_ESTIMATE_TO_TARGET_DATA::EXTRA_CRC,
37678            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
37679                TRAJECTORY_REPRESENTATION_BEZIER_DATA::EXTRA_CRC
37680            }
37681            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
37682                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::EXTRA_CRC
37683            }
37684            TUNNEL_DATA::ID => TUNNEL_DATA::EXTRA_CRC,
37685            UAVCAN_NODE_INFO_DATA::ID => UAVCAN_NODE_INFO_DATA::EXTRA_CRC,
37686            UAVCAN_NODE_STATUS_DATA::ID => UAVCAN_NODE_STATUS_DATA::EXTRA_CRC,
37687            UTM_GLOBAL_POSITION_DATA::ID => UTM_GLOBAL_POSITION_DATA::EXTRA_CRC,
37688            V2_EXTENSION_DATA::ID => V2_EXTENSION_DATA::EXTRA_CRC,
37689            VELOCITY_LIMITS_DATA::ID => VELOCITY_LIMITS_DATA::EXTRA_CRC,
37690            VFR_HUD_DATA::ID => VFR_HUD_DATA::EXTRA_CRC,
37691            VIBRATION_DATA::ID => VIBRATION_DATA::EXTRA_CRC,
37692            VICON_POSITION_ESTIMATE_DATA::ID => VICON_POSITION_ESTIMATE_DATA::EXTRA_CRC,
37693            VIDEO_STREAM_INFORMATION_DATA::ID => VIDEO_STREAM_INFORMATION_DATA::EXTRA_CRC,
37694            VIDEO_STREAM_STATUS_DATA::ID => VIDEO_STREAM_STATUS_DATA::EXTRA_CRC,
37695            VISION_POSITION_ESTIMATE_DATA::ID => VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC,
37696            VISION_SPEED_ESTIMATE_DATA::ID => VISION_SPEED_ESTIMATE_DATA::EXTRA_CRC,
37697            WHEEL_DISTANCE_DATA::ID => WHEEL_DISTANCE_DATA::EXTRA_CRC,
37698            WIFI_CONFIG_AP_DATA::ID => WIFI_CONFIG_AP_DATA::EXTRA_CRC,
37699            WINCH_STATUS_DATA::ID => WINCH_STATUS_DATA::EXTRA_CRC,
37700            WIND_COV_DATA::ID => WIND_COV_DATA::EXTRA_CRC,
37701            _ => 0,
37702        }
37703    }
37704    fn target_system_id(&self) -> Option<u8> {
37705        match self {
37706            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_system),
37707            Self::CANFD_FRAME(inner) => Some(inner.target_system),
37708            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_system),
37709            Self::CAN_FRAME(inner) => Some(inner.target_system),
37710            Self::CHANGE_OPERATOR_CONTROL(inner) => Some(inner.target_system),
37711            Self::COMMAND_ACK(inner) => Some(inner.target_system),
37712            Self::COMMAND_CANCEL(inner) => Some(inner.target_system),
37713            Self::COMMAND_INT(inner) => Some(inner.target_system),
37714            Self::COMMAND_LONG(inner) => Some(inner.target_system),
37715            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_system),
37716            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_system),
37717            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_system),
37718            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_system),
37719            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_system),
37720            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_system),
37721            Self::GPS_INJECT_DATA(inner) => Some(inner.target_system),
37722            Self::LOGGING_ACK(inner) => Some(inner.target_system),
37723            Self::LOGGING_DATA(inner) => Some(inner.target_system),
37724            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_system),
37725            Self::LOG_ERASE(inner) => Some(inner.target_system),
37726            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_system),
37727            Self::LOG_REQUEST_END(inner) => Some(inner.target_system),
37728            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_system),
37729            Self::MISSION_ACK(inner) => Some(inner.target_system),
37730            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_system),
37731            Self::MISSION_COUNT(inner) => Some(inner.target_system),
37732            Self::MISSION_ITEM(inner) => Some(inner.target_system),
37733            Self::MISSION_ITEM_INT(inner) => Some(inner.target_system),
37734            Self::MISSION_REQUEST(inner) => Some(inner.target_system),
37735            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_system),
37736            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_system),
37737            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_system),
37738            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_system),
37739            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_system),
37740            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_system),
37741            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_system),
37742            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_system),
37743            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_system),
37744            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_system),
37745            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_system),
37746            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_system),
37747            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_system),
37748            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_system),
37749            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_system),
37750            Self::PARAM_EXT_SET(inner) => Some(inner.target_system),
37751            Self::PARAM_MAP_RC(inner) => Some(inner.target_system),
37752            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_system),
37753            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_system),
37754            Self::PARAM_SET(inner) => Some(inner.target_system),
37755            Self::PING(inner) => Some(inner.target_system),
37756            Self::PLAY_TUNE(inner) => Some(inner.target_system),
37757            Self::PLAY_TUNE_V2(inner) => Some(inner.target_system),
37758            Self::RADIO_RC_CHANNELS(inner) => Some(inner.target_system),
37759            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_system),
37760            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_system),
37761            Self::REQUEST_EVENT(inner) => Some(inner.target_system),
37762            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_system),
37763            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_system),
37764            Self::SERIAL_CONTROL(inner) => Some(inner.target_system),
37765            Self::SETUP_SIGNING(inner) => Some(inner.target_system),
37766            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_system),
37767            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_system),
37768            Self::SET_GPS_GLOBAL_ORIGIN(inner) => Some(inner.target_system),
37769            Self::SET_HOME_POSITION(inner) => Some(inner.target_system),
37770            Self::SET_MODE(inner) => Some(inner.target_system),
37771            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_system),
37772            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_system),
37773            Self::SET_VELOCITY_LIMITS(inner) => Some(inner.target_system),
37774            Self::SUPPORTED_TUNES(inner) => Some(inner.target_system),
37775            Self::TIMESYNC(inner) => Some(inner.target_system),
37776            Self::TUNNEL(inner) => Some(inner.target_system),
37777            Self::V2_EXTENSION(inner) => Some(inner.target_system),
37778            _ => None,
37779        }
37780    }
37781    fn target_component_id(&self) -> Option<u8> {
37782        match self {
37783            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_component),
37784            Self::CANFD_FRAME(inner) => Some(inner.target_component),
37785            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_component),
37786            Self::CAN_FRAME(inner) => Some(inner.target_component),
37787            Self::COMMAND_ACK(inner) => Some(inner.target_component),
37788            Self::COMMAND_CANCEL(inner) => Some(inner.target_component),
37789            Self::COMMAND_INT(inner) => Some(inner.target_component),
37790            Self::COMMAND_LONG(inner) => Some(inner.target_component),
37791            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_component),
37792            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_component),
37793            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_component),
37794            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_component),
37795            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_component),
37796            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_component),
37797            Self::GPS_INJECT_DATA(inner) => Some(inner.target_component),
37798            Self::LOGGING_ACK(inner) => Some(inner.target_component),
37799            Self::LOGGING_DATA(inner) => Some(inner.target_component),
37800            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_component),
37801            Self::LOG_ERASE(inner) => Some(inner.target_component),
37802            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_component),
37803            Self::LOG_REQUEST_END(inner) => Some(inner.target_component),
37804            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_component),
37805            Self::MISSION_ACK(inner) => Some(inner.target_component),
37806            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_component),
37807            Self::MISSION_COUNT(inner) => Some(inner.target_component),
37808            Self::MISSION_ITEM(inner) => Some(inner.target_component),
37809            Self::MISSION_ITEM_INT(inner) => Some(inner.target_component),
37810            Self::MISSION_REQUEST(inner) => Some(inner.target_component),
37811            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_component),
37812            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_component),
37813            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_component),
37814            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_component),
37815            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_component),
37816            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_component),
37817            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_component),
37818            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_component),
37819            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_component),
37820            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_component),
37821            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_component),
37822            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_component),
37823            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_component),
37824            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_component),
37825            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_component),
37826            Self::PARAM_EXT_SET(inner) => Some(inner.target_component),
37827            Self::PARAM_MAP_RC(inner) => Some(inner.target_component),
37828            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_component),
37829            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_component),
37830            Self::PARAM_SET(inner) => Some(inner.target_component),
37831            Self::PING(inner) => Some(inner.target_component),
37832            Self::PLAY_TUNE(inner) => Some(inner.target_component),
37833            Self::PLAY_TUNE_V2(inner) => Some(inner.target_component),
37834            Self::RADIO_RC_CHANNELS(inner) => Some(inner.target_component),
37835            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_component),
37836            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_component),
37837            Self::REQUEST_EVENT(inner) => Some(inner.target_component),
37838            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_component),
37839            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_component),
37840            Self::SERIAL_CONTROL(inner) => Some(inner.target_component),
37841            Self::SETUP_SIGNING(inner) => Some(inner.target_component),
37842            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_component),
37843            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_component),
37844            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_component),
37845            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_component),
37846            Self::SET_VELOCITY_LIMITS(inner) => Some(inner.target_component),
37847            Self::SUPPORTED_TUNES(inner) => Some(inner.target_component),
37848            Self::TIMESYNC(inner) => Some(inner.target_component),
37849            Self::TUNNEL(inner) => Some(inner.target_component),
37850            Self::V2_EXTENSION(inner) => Some(inner.target_component),
37851            _ => None,
37852        }
37853    }
37854}